OpenVSP API Documentation 3.51.3
Loading...
Searching...
No Matches
Geom Functions

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...

Functions

std::vector< std::string > vsp::GetGeomTypes ()
std::string vsp::AddGeom (const std::string &type, const std::string &parent=std::string())
void vsp::UpdateGeom (const std::string &geom_id)
void vsp::DeleteGeom (const std::string &geom_id)
void vsp::DeleteGeomVec (const std::vector< std::string > &del_vec)
void vsp::CutGeomToClipboard (const std::string &geom_id)
void vsp::CopyGeomToClipboard (const std::string &geom_id)
std::vector< std::string > vsp::PasteGeomClipboard (const std::string &parent=std::string())
std::vector< std::string > vsp::FindGeoms ()
std::vector< std::string > vsp::FindGeomsWithName (const std::string &name)
std::string vsp::FindGeom (const std::string &name, int index)
void vsp::SetGeomName (const std::string &geom_id, const std::string &name)
std::string vsp::GetGeomName (const std::string &geom_id)
std::vector< std::string > vsp::GetGeomParmIDs (const std::string &geom_id)
std::string vsp::GetGeomTypeName (const std::string &geom_id)
void vsp::SetGeomParent (const std::string &geom_id, const std::string &parent_id)
void vsp::ReorderGeom (const std::string &geom_id, int reorder_type)
std::string vsp::AttachGeomTexture (const std::string &geom_id, const std::string &file_name)
void vsp::RemoveGeomTexture (const std::string &geom_id, const std::string &texture_id)
std::vector< std::string > vsp::GetGeomTextureIDVec (const std::string &geom_id)
std::string vsp::GetGeomTextureFileName (const std::string &geom_id, const std::string &texture_id)
std::string vsp::GetGeomParent (const std::string &geom_id)
std::vector< std::string > vsp::GetGeomChildren (const std::string &geom_id)
int vsp::GetNumMainSurfs (const std::string &geom_id)
int vsp::GetTotalNumSurfs (const std::string &geom_id)
int vsp::GetGeomVSPSurfType (const std::string &geom_id, int main_surf_ind=0)
int vsp::GetGeomVSPSurfCfdType (const std::string &geom_id, int main_surf_ind=0)
vec3d vsp::GetGeomBBoxMax (const std::string &geom_id, int main_surf_ind=0, bool ref_frame_is_absolute=true)
vec3d vsp::GetGeomBBoxMin (const std::string &geom_id, int main_surf_ind=0, bool ref_frame_is_absolute=true)
void vsp::SplitWingXSec (const std::string &wing_id, int section_index)
std::vector< int > vsp::GetDriverGroup (const std::string &geom_id, int section_index)
void vsp::ResetPropellerThickness (const std::string &geom_id)
void vsp::CopyAirfoil (const std::string &geom_id, int index)
void vsp::PasteAirfoil (const std::string &geom_id, int index)
void vsp::ClearSkinning (const std::string &geom_id, int index=-1)
void vsp::ResetGeomScale (const std::string &geom_id)
void vsp::AcceptGeomScale (const std::string &geom_id)
std::vector< vec3dvsp::GetPtCloudPnts (const std::string &geom_id)
std::string vsp::CreateNGonMeshGeom (const std::string &geom_id)
std::string vsp::CreateConvexHull (const std::string &geom_id)
void vsp::ProjectPtCloudPts (const std::string &geom_id, const std::string &target_geom_id, int surf_index, int dir_index)

Detailed Description

Function Documentation

◆ AcceptGeomScale()

void vsp::AcceptGeomScale ( const std::string & geom_id)
extern

Turn a MeshGeom into a Point Cloud Geom made of its mesh nodes. This is the Mesh screen's Convert to Point Cloud button.

string pid = AddGeom( "POD" );
string mesh_id = ExportFile( "Example_Mesh.msh", SET_ALL, EXPORT_GMSH );
string cloud_id = CreatePtCloudGeom( mesh_id );
if ( cloud_id.length() == 0 || GetGeomTypeName( cloud_id ) != "PtCloud" )
{
Print( "ERROR: CreatePtCloudGeom did not make a point cloud" );
__failure++;
}
// A Geom that is not a mesh has to be rejected.
CreatePtCloudGeom( pid );
if ( GetNumTotalErrors() == 0 )
{
Print( "ERROR: CreatePtCloudGeom accepted a Geom that is not a mesh" );
__failure++;
}
while ( GetNumTotalErrors() > 0 )
{
ErrorObj err = PopLastError();
}
@ EXPORT_GMSH
Definition APIDefines.h:569
@ SET_ALL
std::string ExportFile(const std::string &file_name, int thick_set, int file_type, int subsFlag=1, int thin_set=vsp::SET_NONE, bool useMode=false, const std::string &modeID="")
std::string AddGeom(const std::string &type, const std::string &parent=std::string())
std::string GetGeomTypeName(const std::string &geom_id)
See also
CreateNGonMeshGeom, CreateConvexHull
Parameters
[in]geom_idstring MeshGeom ID
Returns
string Point Cloud Geom ID

Keep a Geom's scaled size and reset the scale factor to one, folding the scaling into the Geom's own dimensions. This is the Scale tab's Accept button.

string pid = AddGeom( "POD" );
vec3d before_max = GetGeomBBoxMax( pid, 0, false );
SetParmValUpdate( pid, "Scale", "XForm", 2.0 );
// The scale factor comes back to one but the size it produced is kept.
if ( !closeTo( GetParmVal( pid, "Scale", "XForm" ), 1.0, 1e-9 ) )
{
Print( "ERROR: AcceptGeomScale did not reset the scale factor" );
__failure++;
}
vec3d after_max = GetGeomBBoxMax( pid, 0, false );
if ( !closeTo( after_max.x(), 2.0 * before_max.x(), 1e-6 ) )
{
Print( "ERROR: AcceptGeomScale did not keep the scaled size" );
__failure++;
}
Definition Vec3d.h:243
double x() const
Definition Vec3d.h:440
vec3d GetGeomBBoxMax(const std::string &geom_id, int main_surf_ind=0, bool ref_frame_is_absolute=true)
void AcceptGeomScale(const std::string &geom_id)
double SetParmValUpdate(const std::string &parm_id, double val)
double GetParmVal(const std::string &parm_id)
void Update(bool update_managers=true)
See also
ResetGeomScale
Parameters
[in]geom_idstring Geom ID

◆ AddGeom()

std::string vsp::AddGeom ( const std::string & type,
const std::string & parent = std::string() )
extern

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

//==== Add Wing Geometry ====//
string wing_id = AddGeom( "WING" );
if ( wing_id.length() == 0 || wing_id == "NONE" )
{
Print( "ERROR: AddGeom returned no id" );
__failure++;
}
Parameters
[in]typestring Geom type (i.e FUSELAGE, POD, etc.)
[in]parentstring Parent Geom ID
Returns
string Geom ID

◆ AttachGeomTexture()

std::string vsp::AttachGeomTexture ( const std::string & geom_id,
const std::string & file_name )
extern

Attach a texture image to a Geom, the way the Add button on the Texture screen does. A texture is drawn on the Geom's surface at a placement given by its Parms; the returned ID is a ParmContainer ID, so U, W, U_Scale, W_Scale, Transparency, U_Flip and W_Flip in the "Texture_Parm" group are reached the usual way.

string pod_id = AddGeom( "POD", "" );
string tex_id = AttachGeomTexture( pod_id, "textures/nasa-logo.tga" );
if ( tex_id.length() == 0 )
{
Print( "ERROR: AttachGeomTexture attached nothing" );
__failure++;
}
// Place the logo on the upper surface, at half size.
SetParmVal( tex_id, "U", "Texture_Parm", 0.35 );
SetParmVal( tex_id, "W", "Texture_Parm", 0.25 );
SetParmVal( tex_id, "U_Scale", "Texture_Parm", 0.5 );
SetParmVal( tex_id, "W_Scale", "Texture_Parm", 0.5 );
array< string > @tex_ids = GetGeomTextureIDVec( pod_id );
if ( tex_ids.size() != 1 || tex_ids[0] != tex_id )
{
Print( "ERROR: the texture is not in the texture list" );
__failure++;
}
std::string AttachGeomTexture(const std::string &geom_id, const std::string &file_name)
std::vector< std::string > GetGeomTextureIDVec(const std::string &geom_id)
double SetParmVal(const std::string &parm_id, double val)
See also
RemoveGeomTexture, GetGeomTextureIDVec, GetGeomTextureFileName
Parameters
[in]geom_idstring Geom ID
[in]file_namestring Name of the texture image file
Returns
string ParmContainer ID for the attached texture

◆ ClearSkinning()

void vsp::ClearSkinning ( const std::string & geom_id,
int index = -1 )
extern

Clear the skinning of one cross section, or of every cross section when the index is left at -1. This is the Skinning tab's Clear and Clear All buttons.

string sid = AddGeom( "STACK", "" );
string xsec_surf = GetXSecSurf( sid, 0 );
string xsec = GetXSec( xsec_surf, 1 );
SetXSecTanAngles( xsec, XSEC_BOTH_SIDES, 15.0 );
if ( !closeTo( GetParmVal( GetXSecParm( xsec, "TopLAngleSet" ) ), 1.0, 1e-12 ) )
{
Print( "ERROR: the skinning was never set" );
__failure++;
}
ClearSkinning( sid, 1 );
// Clearing releases the section's skinning controls and puts symmetry back
// on; the angle itself becomes whatever the skin solves for.
if ( !closeTo( GetParmVal( GetXSecParm( xsec, "TopLAngleSet" ) ), 0.0, 1e-12 ) ||
!closeTo( GetParmVal( GetXSecParm( xsec, "AllSym" ) ), 1.0, 1e-12 ) )
{
Print( "ERROR: ClearSkinning did not release the section" );
__failure++;
}
// A Geom with no cross sections has to be rejected.
string pid = AddGeom( "POD" );
if ( GetNumTotalErrors() == 0 )
{
Print( "ERROR: ClearSkinning accepted a Geom with no cross sections" );
__failure++;
}
while ( GetNumTotalErrors() > 0 )
{
ErrorObj err = PopLastError();
}
@ XSEC_BOTH_SIDES
void ClearSkinning(const std::string &geom_id, int index=-1)
std::string GetXSecParm(const std::string &xsec_id, const std::string &name)
std::string GetXSecSurf(const std::string &geom_id, int index)
std::string GetXSec(const std::string &xsec_surf_id, int xsec_index)
See also
ResetXSecSkinParms
Parameters
[in]geom_idstring Geom ID
[in]indexint Cross section index, or -1 for every section

◆ CopyAirfoil()

void vsp::CopyAirfoil ( const std::string & geom_id,
int index )
extern

Link two Parms so that changing the first drives the second. This is the simple Parm Link the Link screen builds, not an Advanced Link. The link is created with its offset active and set to the difference between the two Parms, so B follows A while holding its current separation.

string pod1 = AddGeom( "POD", "" );
string pod2 = AddGeom( "POD", "" );
string xa = GetParm( pod1, "X_Rel_Location", "XForm" );
string xb = GetParm( pod2, "X_Rel_Location", "XForm" );
SetParmVal( xb, 3.0 );
string link_id = AddParmLink( xa, xb );
if ( link_id.length() == 0 )
{
Print( "ERROR: AddParmLink returned no id" );
__failure++;
}
if ( GetNumParmLinks() != 1 || GetParmLinkID( 0 ) != link_id )
{
Print( "ERROR: AddParmLink did not add the link" );
__failure++;
}
// The link drives B from A, holding the three unit offset it started with.
SetParmValUpdate( xa, 5.0 );
if ( !closeTo( GetParmVal( xb ), 8.0, 1e-6 ) )
{
Print( "ERROR: the parm link did not drive its output" );
__failure++;
}
// Linking the same pair twice has to be refused.
AddParmLink( xa, xb );
if ( GetNumTotalErrors() == 0 )
{
Print( "ERROR: AddParmLink accepted a duplicate link" );
__failure++;
}
// That error was raised deliberately, so take it back off the queue.
while ( GetNumTotalErrors() > 0 )
{
ErrorObj err = PopLastError();
}
std::string GetParm(const std::string &geom_id, const std::string &name, const std::string &group)
See also
GetNumParmLinks, GetParmLinkID, DelParmLink, DelAllParmLinks, AddAdvLink
Parameters
[in]parm_a_idstring Parm ID of the driving Parm
[in]parm_b_idstring Parm ID of the driven Parm
Returns
string Parm Link ID

Copy the airfoil of a wing section to the airfoil clipboard. This is a separate clipboard from the one CopyXSec uses, so an airfoil can be moved without carrying the section geometry with it.

string wid = AddGeom( "WING" );
// Give section 1 a distinctive airfoil.
string xsec_surf = GetXSecSurf( wid, 0 );
ChangeXSecShape( xsec_surf, 1, XS_SIX_SERIES );
CopyAirfoil( wid, 1 );
PasteAirfoil( wid, 0 );
// The airfoil travels; the section geometry does not.
if ( GetXSecShape( GetXSec( xsec_surf, 0 ) ) != XS_SIX_SERIES )
{
Print( "ERROR: the airfoil did not paste" );
__failure++;
}
// A Geom that is not a wing has to be rejected.
string pid = AddGeom( "POD" );
CopyAirfoil( pid, 0 );
if ( GetNumTotalErrors() == 0 )
{
Print( "ERROR: CopyAirfoil accepted a Geom that is not a wing" );
__failure++;
}
while ( GetNumTotalErrors() > 0 )
{
ErrorObj err = PopLastError();
}
@ XS_SIX_SERIES
void PasteAirfoil(const std::string &geom_id, int index)
void CopyAirfoil(const std::string &geom_id, int index)
int GetXSecShape(const std::string &xsec_id)
void ChangeXSecShape(const std::string &xsec_surf_id, int xsec_index, int type)
See also
PasteAirfoil, CopyXSec
Parameters
[in]geom_idstring Wing Geom ID
[in]indexint Wing section index

◆ CopyGeomToClipboard()

void vsp::CopyGeomToClipboard ( const std::string & geom_id)
extern

Copy Geom from current location and store on clipboard

//==== Add Pod Geometries ====//
string pid1 = AddGeom( "POD", "" );
string pid2 = AddGeom( "POD", "" );
PasteGeomClipboard( pid2 ); // Paste Pod 1 as child of Pod 2
array< string > @geom_ids = FindGeoms();
if ( geom_ids.size() != 3 ) { Print( "---> Error: API Copy/Paste Geom " ); __failure++; }
std::vector< std::string > PasteGeomClipboard(const std::string &parent=std::string())
std::vector< std::string > FindGeoms()
void CopyGeomToClipboard(const std::string &geom_id)
See also
PasteGeomClipboard
Parameters
[in]geom_idstring Geom ID

◆ CreateConvexHull()

std::string vsp::CreateConvexHull ( const std::string & geom_id)
extern

Build the convex hull of a Point Cloud Geom. The hull arrives as a new MeshGeom; the point cloud itself is left alone. This is the Point Cloud screen's Convex Hull button.

string pid = AddGeom( "POD" );
string mesh_id = ExportFile( "Example_Mesh.msh", SET_ALL, EXPORT_GMSH );
string cloud_id = CreatePtCloudGeom( mesh_id );
int num_pnts = GetPtCloudPnts( cloud_id ).size();
string hull_id = CreateConvexHull( cloud_id );
// The hull is a mesh of its own, and the cloud it came from is untouched.
if ( hull_id.length() == 0 || GetGeomTypeName( hull_id ) != "Mesh" )
{
Print( "ERROR: CreateConvexHull did not make a hull mesh" );
__failure++;
}
if ( int( GetPtCloudPnts( cloud_id ).size() ) != num_pnts )
{
Print( "ERROR: CreateConvexHull disturbed the point cloud" );
__failure++;
}
// A Geom that is not a point cloud has to be rejected.
if ( GetNumTotalErrors() == 0 )
{
Print( "ERROR: CreateConvexHull accepted a Geom that is not a point cloud" );
__failure++;
}
while ( GetNumTotalErrors() > 0 )
{
ErrorObj err = PopLastError();
}
std::vector< vec3d > GetPtCloudPnts(const std::string &geom_id)
std::string CreateConvexHull(const std::string &geom_id)
See also
CreatePtCloudGeom, GetPtCloudPnts
Parameters
[in]geom_idstring Point Cloud Geom ID
Returns
string MeshGeom ID of the hull

◆ CreateNGonMeshGeom()

std::string vsp::CreateNGonMeshGeom ( const std::string & geom_id)
extern

Turn a MeshGeom into an NGon Mesh Geom. This is the Mesh screen's Convert to NGon Mesh button.

string pid = AddGeom( "POD" );
string mesh_id = ExportFile( "Example_Mesh.msh", SET_ALL, EXPORT_GMSH );
string ngon_id = CreateNGonMeshGeom( mesh_id );
if ( ngon_id.length() == 0 || GetGeomTypeName( ngon_id ) != "NGonMesh" )
{
Print( "ERROR: CreateNGonMeshGeom did not make an NGon mesh" );
__failure++;
}
// A Geom that is not a mesh has to be rejected.
if ( GetNumTotalErrors() == 0 )
{
Print( "ERROR: CreateNGonMeshGeom accepted a Geom that is not a mesh" );
__failure++;
}
while ( GetNumTotalErrors() > 0 )
{
ErrorObj err = PopLastError();
}
std::string CreateNGonMeshGeom(const std::string &geom_id)
See also
CreatePtCloudGeom
Parameters
[in]geom_idstring MeshGeom ID
Returns
string NGon Mesh Geom ID

◆ CutGeomToClipboard()

void vsp::CutGeomToClipboard ( const std::string & geom_id)
extern

Cut Geom from current location and store on clipboard

//==== Add Pod Geometries ====//
string pid1 = AddGeom( "POD", "" );
string pid2 = AddGeom( "POD", "" );
PasteGeomClipboard( pid2 ); // Paste Pod 1 as child of Pod 2
array< string > @geom_ids = FindGeoms();
if ( geom_ids.size() != 2 ) { Print( "---> Error: API Cut/Paste Geom " ); __failure++; }
void CutGeomToClipboard(const std::string &geom_id)
See also
PasteGeomClipboard
Parameters
[in]geom_idstring Geom ID

◆ DeleteGeom()

void vsp::DeleteGeom ( const std::string & geom_id)
extern

Delete a particular Geom

//==== Add Wing Geometry ====//
string wing_id = AddGeom( "WING" );
//==== Add Pod Geometry ====//
string pod_id = AddGeom( "POD" );
int num_before_del = FindGeoms().length();
DeleteGeom( wing_id );
if ( FindGeoms().length() >= num_before_del )
{
Print( "ERROR: DeleteGeom removed nothing" );
__failure++;
}
void DeleteGeom(const std::string &geom_id)
Parameters
[in]geom_idstring Geom ID

◆ DeleteGeomVec()

void vsp::DeleteGeomVec ( const std::vector< std::string > & del_vec)
extern

Delete multiple Geoms

//==== Add Pod Geometry ====//
string pid = AddGeom( "POD", "" );
string rid = ExecAnalysis( "CompGeom" );
array<string>@ mesh_id_vec = GetStringResults( rid, "Mesh_GeomID" );
int num_before_del = FindGeoms().length();
DeleteGeomVec( mesh_id_vec );
if ( FindGeoms().length() >= num_before_del )
{
Print( "ERROR: DeleteGeomVec removed nothing" );
__failure++;
}
std::string ExecAnalysis(const std::string &analysis)
void DeleteGeomVec(const std::vector< std::string > &del_vec)
const std::vector< std::string > & GetStringResults(const std::string &id, const std::string &name, int index=0)
Parameters
[in]del_vecvector<string> Vector of Geom IDs

◆ FindGeom()

std::string vsp::FindGeom ( const std::string & name,
int index )
extern

Find and return the Geom ID with the specified name at given index. Equivalent to FindGeomsWithName( name )[index].

//==== Add Pod Geometry ====//
string pid = AddGeom( "POD", "" );
SetGeomName( pid, "ExamplePodName" );
string geom_id = FindGeom( "ExamplePodName", 0 );
array< string > @geom_ids = FindGeomsWithName( "ExamplePodName" );
if ( geom_ids[0] != geom_id )
{
Print( "---> Error: API FindGeom & FindGeomsWithName" );
__failure++;
}
std::vector< std::string > FindGeomsWithName(const std::string &name)
std::string FindGeom(const std::string &name, int index)
void SetGeomName(const std::string &geom_id, const std::string &name)
See also
FindGeomsWithName
Parameters
[in]namestring Geom name
[in]index
Returns
string Geom ID with name at specified index

◆ FindGeoms()

std::vector< std::string > vsp::FindGeoms ( )
extern

Find and return all Geom IDs in the model

//==== Add Pod Geometries ====//
string pod1 = AddGeom( "POD", "" );
string pod2 = AddGeom( "POD", "" );
//==== There Should Be Two Geoms =====//
array< string > @geom_ids = FindGeoms();
if ( geom_ids.size() != 2 ) { Print( "---> Error: API FindGeoms " ); __failure++; }
Returns
vector<string> Array of all Geom IDs

◆ FindGeomsWithName()

std::vector< std::string > vsp::FindGeomsWithName ( const std::string & name)
extern

Find and return all Geom IDs with the specified name

//==== Add Pod Geometry ====//
string pid = AddGeom( "POD", "" );
SetGeomName( pid, "ExamplePodName" );
array< string > @geom_ids = FindGeomsWithName( "ExamplePodName" );
if ( geom_ids.size() != 1 )
{
Print( "---> Error: API FindGeomsWithName " );
__failure++;
}
See also
FindGeom
Parameters
[in]namestring Geom name
Returns
vector<string> Array of Geom IDs

◆ GetDriverGroup()

std::vector< int > vsp::GetDriverGroup ( const std::string & geom_id,
int section_index )
extern

Set the driver group for a wing section or a XSecCurve. Care has to be taken when setting these driver groups to ensure a valid combination.

//==== Add Wing Geometry and Set Parms ====//
string wing_id = AddGeom( "WING", "" );
//==== Set Wing Section Controls ====//
SetDriverGroup( wing_id, 1, AR_WSECT_DRIVER, ROOTC_WSECT_DRIVER, TIPC_WSECT_DRIVER );
//==== Set Parms ====//
SetParmVal( wing_id, "Root_Chord", "XSec_1", 2 );
SetParmVal( wing_id, "Tip_Chord", "XSec_1", 1 );
// The three chosen drivers are the values that hold; span is now solved for
// from the aspect ratio and the two chords.
double ar = GetParmVal( wing_id, "Aspect", "XSec_1" );
double span = GetParmVal( wing_id, "Span", "XSec_1" );
if ( !closeTo( GetParmVal( wing_id, "Root_Chord", "XSec_1" ), 2.0, 1e-6 ) ||
!closeTo( GetParmVal( wing_id, "Tip_Chord", "XSec_1" ), 1.0, 1e-6 ) )
{
Print( "ERROR: the driving Parms did not hold their values" );
__failure++;
}
// A section of this planform has area span * ( root + tip ) / 2, and aspect
// ratio span * span / area.
double area = span * ( 2.0 + 1.0 ) * 0.5;
if ( !closeTo( ar, span * span / area, 1e-6 ) )
{
Print( "ERROR: SetDriverGroup left the section inconsistent" );
__failure++;
}
@ ROOTC_WSECT_DRIVER
@ TIPC_WSECT_DRIVER
@ AR_WSECT_DRIVER
See also
WING_DRIVERS, XSEC_DRIVERS
Parameters
[in]geom_idstring Geom ID
[in]section_indexint Wing section index
[in]driver_0int First driver enum (i.e. SPAN_WSECT_DRIVER)
[in]driver_1int Second driver enum (i.e. ROOTC_WSECT_DRIVER)
[in]driver_2int Third driver enum (i.e. TIPC_WSECT_DRIVER)

Get the driver group for a wing section or an XSec. A wing section reports three drivers; an XSecCurve reports the drivers of its own driver group.

//==== Add Wing Geometry ====//
string wing_id = AddGeom( "WING", "" );
SetDriverGroup( wing_id, 1, AR_WSECT_DRIVER, ROOTC_WSECT_DRIVER, TIPC_WSECT_DRIVER );
array < int > drivers = GetDriverGroup( wing_id, 1 );
// The drivers come back in the order they were set.
if ( drivers.size() != 3 )
{
Print( "ERROR: GetDriverGroup did not report three wing drivers" );
__failure++;
}
else
{
if ( drivers[0] != AR_WSECT_DRIVER || drivers[1] != ROOTC_WSECT_DRIVER || drivers[2] != TIPC_WSECT_DRIVER )
{
Print( "ERROR: GetDriverGroup did not report the drivers that were set" );
__failure++;
}
}
// A section index past the end has to be rejected.
GetDriverGroup( wing_id, 100 );
if ( GetNumTotalErrors() == 0 )
{
Print( "ERROR: GetDriverGroup accepted a section index past the end" );
__failure++;
}
// That error was raised deliberately, so take it back off the queue.
while ( GetNumTotalErrors() > 0 )
{
ErrorObj err = PopLastError();
}
std::vector< int > GetDriverGroup(const std::string &geom_id, int section_index)
See also
WING_DRIVERS, XSEC_DRIVERS, SetDriverGroup
Parameters
[in]geom_idstring Geom ID
[in]section_indexint Wing section or XSec index
Returns
vector<int> Array of driver enums

◆ GetGeomBBoxMax()

vec3d vsp::GetGeomBBoxMax ( const std::string & geom_id,
int main_surf_ind = 0,
bool ref_frame_is_absolute = true )
extern

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.

//==== Add Pod Geometry ====//
string pid = AddGeom( "POD" );
SetParmVal( FindParm( pid, "Y_Rotation", "XForm" ), 45 );
SetParmVal( FindParm( pid, "Z_Rotation", "XForm" ), 25 );
vec3d max_pnt = GetGeomBBoxMax( pid, 0, false );
vec3d min_pnt = GetGeomBBoxMin( pid, 0, false );
if ( max_pnt.x() <= min_pnt.x() || max_pnt.y() <= min_pnt.y() || max_pnt.z() <= min_pnt.z() )
{
Print( "ERROR: GetGeomBBoxMax is not above the minimum corner" );
__failure++;
}
double y() const
Definition Vec3d.h:477
double z() const
Definition Vec3d.h:514
vec3d GetGeomBBoxMin(const std::string &geom_id, int main_surf_ind=0, bool ref_frame_is_absolute=true)
std::string FindParm(const std::string &parm_container_id, const std::string &parm_name, const std::string &group_name)
See also
GetGeomBBoxMin
Parameters
[in]geom_idstring Geom ID
[in]main_surf_indint Main surface index
[in]ref_frame_is_absolutebool Flag to specify absolute or body reference frame
Returns
vec3d Maximum coordinate of the bounding box

◆ GetGeomBBoxMin()

vec3d vsp::GetGeomBBoxMin ( const std::string & geom_id,
int main_surf_ind = 0,
bool ref_frame_is_absolute = true )
extern

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.

//==== Add Pod Geometry ====//
string pid = AddGeom( "POD" );
SetParmVal( FindParm( pid, "Y_Rotation", "XForm" ), 45 );
SetParmVal( FindParm( pid, "Z_Rotation", "XForm" ), 25 );
vec3d min_pnt = GetGeomBBoxMin( pid, 0, false );
vec3d max_pnt = GetGeomBBoxMax( pid, 0, false );
if ( min_pnt.x() >= max_pnt.x() || min_pnt.y() >= max_pnt.y() || min_pnt.z() >= max_pnt.z() )
{
Print( "ERROR: GetGeomBBoxMin is not below the maximum corner" );
__failure++;
}
See also
GetGeomBBoxMax
Parameters
[in]geom_idstring Geom ID
[in]main_surf_indint Main surface index
[in]ref_frame_is_absolutebool Flag to specify absolute or body reference frame
Returns
vec3d Minimum coordinate of the bounding box

◆ GetGeomChildren()

std::vector< std::string > vsp::GetGeomChildren ( const std::string & geom_id)
extern

Get the IDs for each child of the input parent Geom.

//==== Add Parent and Child Geometry ====//
string pod1 = AddGeom( "POD" );
string pod2 = AddGeom( "POD", pod1 );
string pod3 = AddGeom( "POD", pod2 );
Print( "Children of Pod #1: " );
array<string> children = GetGeomChildren( pod1 );
if ( children.length() == 0 )
{
Print( "ERROR: GetGeomChildren returned nothing" );
__failure++;
}
for ( int i = 0; i < int( children.size() ); i++ )
{
Print( "\t", false );
Print( children[i] );
}
std::vector< std::string > GetGeomChildren(const std::string &geom_id)
Parameters
[in]geom_idstring Geom ID
Returns
vector<string> Vector of child Geom IDs

◆ GetGeomName()

std::string vsp::GetGeomName ( const std::string & geom_id)
extern

Get the name of a specific Geom

//==== Add Pod Geometry ====//
string pid = AddGeom( "POD", "" );
SetGeomName( pid, "ExamplePodName" );
string name_str = "Geom Name: " + GetGeomName( pid );
Print( name_str );
if ( GetGeomName( pid ) != "ExamplePodName" )
{
Print( "ERROR: GetGeomName did not report the name that was set" );
__failure++;
}
// The name is how FindGeomsWithName looks Geoms up.
array< string > @found = FindGeomsWithName( "ExamplePodName" );
if ( found.size() != 1 || found[0] != pid )
{
Print( "ERROR: GetGeomName disagrees with FindGeomsWithName" );
__failure++;
}
std::string GetGeomName(const std::string &geom_id)
Parameters
[in]geom_idstring Geom ID
Returns
string Geom name

◆ GetGeomParent()

std::string vsp::GetGeomParent ( const std::string & geom_id)
extern

Get the parent Geom ID for the input child Geom. "NONE" is returned if the Geom has no parent.

//==== Add Parent and Child Geometry ====//
string pod1 = AddGeom( "POD" );
string pod2 = AddGeom( "POD", pod1 );
Print( "Parent ID of Pod #2: ", false );
Print( GetGeomParent( pod2 ) );
if ( GetGeomParent( pod2 ) != pod1 )
{
Print( "ERROR: GetGeomParent did not report the parent it was given" );
__failure++;
}
// The relationship has to read the same from the other end.
array< string > @children = GetGeomChildren( pod1 );
if ( children.size() != 1 || children[0] != pod2 )
{
Print( "ERROR: GetGeomParent disagrees with GetGeomChildren" );
__failure++;
}
// A Geom added with no parent sits at the top level.
if ( GetGeomParent( pod1 ) != "NONE" )
{
Print( "ERROR: GetGeomParent did not report NONE for a top level Geom" );
__failure++;
}
std::string GetGeomParent(const std::string &geom_id)
Parameters
[in]geom_idstring Geom ID
Returns
string Parent Geom ID

◆ GetGeomParmIDs()

std::vector< std::string > vsp::GetGeomParmIDs ( const std::string & geom_id)
extern

Get all Parm IDs associated with this Geom Parm container

//==== Add Pod Geometry ====//
string pid = AddGeom( "POD", "" );
Print( string( "---> Test Get Parm Arrays" ) );
array< string > @parm_array = GetGeomParmIDs( pid );
if ( parm_array.size() < 1 ) { Print( "---> Error: API GetGeomParmIDs " ); __failure++; }
std::vector< std::string > GetGeomParmIDs(const std::string &geom_id)
Parameters
[in]geom_idstring Geom ID
Returns
vector<string> Array of Parm IDs

◆ GetGeomTextureFileName()

std::string vsp::GetGeomTextureFileName ( const std::string & geom_id,
const std::string & texture_id )
extern

Get the image file a texture was attached from.

string pod_id = AddGeom( "POD", "" );
string tex_id = AttachGeomTexture( pod_id, "textures/nasa-logo.tga" );
if ( GetGeomTextureFileName( pod_id, tex_id ) != "textures/nasa-logo.tga" )
{
Print( "ERROR: GetGeomTextureFileName did not report the file" );
__failure++;
}
std::string GetGeomTextureFileName(const std::string &geom_id, const std::string &texture_id)
See also
AttachGeomTexture
Parameters
[in]geom_idstring Geom ID
[in]texture_idstring Texture ParmContainer ID
Returns
string Name of the texture image file

◆ GetGeomTextureIDVec()

std::vector< std::string > vsp::GetGeomTextureIDVec ( const std::string & geom_id)
extern

Get the ParmContainer IDs of all the textures attached to a Geom, in the order they are drawn.

string pod_id = AddGeom( "POD", "" );
// A fresh Geom carries no textures.
if ( GetGeomTextureIDVec( pod_id ).size() != 0 )
{
Print( "ERROR: a new Geom already carries textures" );
__failure++;
}
AttachGeomTexture( pod_id, "textures/nasa-logo.tga" );
AttachGeomTexture( pod_id, "textures/window.tga" );
if ( GetGeomTextureIDVec( pod_id ).size() != 2 )
{
Print( "ERROR: GetGeomTextureIDVec, two were attached" );
__failure++;
}
See also
AttachGeomTexture, RemoveGeomTexture
Parameters
[in]geom_idstring Geom ID
Returns
vector<string> Vector of texture ParmContainer IDs

◆ GetGeomTypeName()

std::string vsp::GetGeomTypeName ( const std::string & geom_id)
extern

Get the type name of specified Geom (i.e. FUSELAGE)

//==== Add Wing Geometry ====//
string wing_id = AddGeom( "WING" );
Print( "Geom Type Name: ", false );
Print( GetGeomTypeName( wing_id ) );
if ( GetGeomTypeName( wing_id ) != "Wing" )
{
Print( "ERROR: GetGeomTypeName did not report the type that was added" );
__failure++;
}
// A Geom of a different type has to report a different name.
string pod_id = AddGeom( "POD" );
if ( GetGeomTypeName( pod_id ) == GetGeomTypeName( wing_id ) )
{
Print( "ERROR: GetGeomTypeName gave two types the same name" );
__failure++;
}
Parameters
[in]geom_idstring Geom ID
Returns
string Geom type name

◆ GetGeomTypes()

std::vector< std::string > vsp::GetGeomTypes ( )
extern

Get an array of all Geom types (i.e FUSELAGE, POD, etc.)

//==== Add Pod Geometries ====//
string pod1 = AddGeom( "POD", "" );
string pod2 = AddGeom( "POD", "" );
array< string > @type_array = GetGeomTypes();
if ( type_array[0] != "POD" ) { Print( "---> Error: API GetGeomTypes " ); __failure++; }
std::vector< std::string > GetGeomTypes()
Returns
vector<string> Array of Geom type names

◆ GetGeomVSPSurfCfdType()

int vsp::GetGeomVSPSurfCfdType ( const std::string & geom_id,
int main_surf_ind = 0 )
extern

Get the VSP surface CFD type of the specified Geom

//==== Add Wing Geometry ====//
string wing_id = AddGeom( "WING" );
if ( GetGeomVSPSurfCfdType( wing_id ) != CFD_NORMAL )
{
Print( "---> Error: API GetGeomVSPSurfCfdType " );
__failure++;
}
@ CFD_NORMAL
int GetGeomVSPSurfCfdType(const std::string &geom_id, int main_surf_ind=0)
See also
VSP_SURF_CFD_TYPE
Parameters
[in]geom_idstring Geom ID
[in]main_surf_indint Main surface index
Returns
int VSP surface CFD type enum (i.e. CFD_TRANSPARENT)

◆ GetGeomVSPSurfType()

int vsp::GetGeomVSPSurfType ( const std::string & geom_id,
int main_surf_ind = 0 )
extern

Get the VSP surface type of the specified Geom

//==== Add Wing Geometry ====//
string wing_id = AddGeom( "WING" );
if ( GetGeomVSPSurfType( wing_id ) != WING_SURF )
{
Print( "---> Error: API GetGeomVSPSurfType " );
__failure++;
}
@ WING_SURF
int GetGeomVSPSurfType(const std::string &geom_id, int main_surf_ind=0)
See also
VSP_SURF_TYPE
Parameters
[in]geom_idstring Geom ID
[in]main_surf_indint Main surface index
Returns
int VSP surface type enum (i.e. DISK_SURF)

◆ GetNumMainSurfs()

int vsp::GetNumMainSurfs ( const std::string & geom_id)
extern

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.

//==== Add Prop Geometry ====//
string prop_id = AddGeom( "PROP" );
int num_surf = 0;
num_surf = GetNumMainSurfs( prop_id ); // Should be the same as the number of blades
if ( num_surf != GetIntParmVal( FindParm( prop_id, "NumBlade", "Design" ) ) )
{
Print( "ERROR: GetNumMainSurfs does not match the blade count" );
__failure++;
}
Print( "Number of Propeller Surfaces: ", false );
Print( num_surf );
int GetNumMainSurfs(const std::string &geom_id)
int GetIntParmVal(const std::string &parm_id)
Parameters
[in]geom_idstring Geom ID
Returns
int Number of main surfaces

◆ GetPtCloudPnts()

std::vector< vec3d > vsp::GetPtCloudPnts ( const std::string & geom_id)
extern

Get the points of a Point Cloud Geom

string pid = AddGeom( "POD" );
string mesh_id = ExportFile( "Example_Mesh.msh", SET_ALL, EXPORT_GMSH );
string cloud_id = CreatePtCloudGeom( mesh_id );
array< vec3d > @pnts = GetPtCloudPnts( cloud_id );
if ( pnts.size() == 0 )
{
Print( "ERROR: GetPtCloudPnts returned nothing" );
__failure++;
}
// A Geom that is not a point cloud has to be rejected.
if ( GetNumTotalErrors() == 0 )
{
Print( "ERROR: GetPtCloudPnts accepted a Geom that is not a point cloud" );
__failure++;
}
while ( GetNumTotalErrors() > 0 )
{
ErrorObj err = PopLastError();
}
See also
CreatePtCloudGeom, CreateConvexHull
Parameters
[in]geom_idstring Point Cloud Geom ID
Returns
vector<vec3d> Array of point cloud points

◆ GetTotalNumSurfs()

int vsp::GetTotalNumSurfs ( const std::string & geom_id)
extern

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.

//==== Add Wing Geometry ====//
string wing_id = AddGeom( "WING" );
int num_surf = 0;
num_surf = GetTotalNumSurfs( wing_id ); // Wings default with XZ symmetry on -> 2 surfaces
if ( num_surf != 2 )
{
Print( "ERROR: GetTotalNumSurfs, expected 2 for a symmetric wing" );
__failure++;
}
Print( "Total Number of Wing Surfaces: ", false );
Print( num_surf );
int GetTotalNumSurfs(const std::string &geom_id)
Parameters
[in]geom_idstring Geom ID
Returns
int Number of main surfaces

◆ PasteAirfoil()

void vsp::PasteAirfoil ( const std::string & geom_id,
int index )
extern

Paste the airfoil clipboard onto a wing section

See also
CopyAirfoil, PasteXSec
Parameters
[in]geom_idstring Wing Geom ID
[in]indexint Wing section index

◆ PasteGeomClipboard()

std::vector< std::string > vsp::PasteGeomClipboard ( const std::string & parent = std::string())
extern

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.

//==== Add Pod Geometries ====//
string pid1 = AddGeom( "POD", "" );
string pid2 = AddGeom( "POD", "" );
PasteGeomClipboard( pid2 ); // Paste Pod 1 as child of Pod 2
array< string > @geom_ids = FindGeoms();
if ( geom_ids.size() != 2 ) { Print( "---> Error: API Cut/Paste Geom " ); __failure++; }
Parameters
[in]parentstring Parent Geom ID
Returns
vector<string> Vector of pasted Geom IDs

◆ ProjectPtCloudPts()

void vsp::ProjectPtCloudPts ( const std::string & geom_id,
const std::string & target_geom_id,
int surf_index,
int dir_index )
extern

Project the points of a point cloud onto a surface of another Geom, the way the Project button on the Point Cloud screen does. Each point is moved along the chosen axis until it lands on the target surface; a point that does not hit the surface is left where it is.

string pid = AddGeom( "POD" );
// Mesh the Pod, then make a point cloud out of the mesh vertices.
string mesh_id = ExportFile( "ProjectExample.msh", SET_ALL, EXPORT_GMSH );
string cloud_id = CreatePtCloudGeom( mesh_id );
// Lift the cloud above the Pod so the points have somewhere to fall from.
SetParmVal( cloud_id, "Z_Rel_Location", "XForm", 5.0 );
array< vec3d > @before = GetPtCloudPnts( cloud_id );
ProjectPtCloudPts( cloud_id, pid, 0, Z_DIR );
array< vec3d > @after = GetPtCloudPnts( cloud_id );
// Projection moves points; it never adds or removes any.
if ( after.size() != before.size() )
{
Print( "ERROR: ProjectPtCloudPts changed the point count" );
__failure++;
}
void ProjectPtCloudPts(const std::string &geom_id, const std::string &target_geom_id, int surf_index, int dir_index)
See also
CreatePtCloudGeom, CreateConvexHull
Parameters
[in]geom_idstring Point cloud Geom ID
[in]target_geom_idstring Geom ID of the Geom to project onto
[in]surf_indexint Surface index on the target Geom
[in]dir_indexint Direction to project along, X_DIR, Y_DIR or Z_DIR (see DIR_INDEX)

◆ RemoveGeomTexture()

void vsp::RemoveGeomTexture ( const std::string & geom_id,
const std::string & texture_id )
extern

Remove a texture from a Geom, the way the Delete button on the Texture screen does.

string pod_id = AddGeom( "POD", "" );
string tex_id = AttachGeomTexture( pod_id, "textures/nasa-logo.tga" );
RemoveGeomTexture( pod_id, tex_id );
if ( GetGeomTextureIDVec( pod_id ).size() != 0 )
{
Print( "ERROR: RemoveGeomTexture left the texture behind" );
__failure++;
}
void RemoveGeomTexture(const std::string &geom_id, const std::string &texture_id)
See also
AttachGeomTexture, GetGeomTextureIDVec
Parameters
[in]geom_idstring Geom ID
[in]texture_idstring Texture ParmContainer ID

◆ ReorderGeom()

void vsp::ReorderGeom ( const std::string & geom_id,
int reorder_type )
extern

Move a Geom within the list of its siblings, the way the move buttons beside the Geom browser do. A Geom's position among its siblings sets the order it is written, exported and drawn in; it does not change the Geom's parent or its geometry.

string pod1 = AddGeom( "POD", "" );
string pod2 = AddGeom( "POD", "" );
// Both Pods sit at the top level, in the order they were added.
if ( FindGeoms()[0] != pod1 )
{
Print( "ERROR: the Geoms did not start in creation order" );
__failure++;
}
if ( FindGeoms()[0] != pod2 )
{
Print( "ERROR: ReorderGeom did not move the Geom" );
__failure++;
}
if ( FindGeoms()[0] != pod1 )
{
Print( "ERROR: ReorderGeom did not move the Geom back" );
__failure++;
}
@ REORDER_MOVE_UP
@ REORDER_MOVE_BOTTOM
void ReorderGeom(const std::string &geom_id, int reorder_type)
See also
SetGeomParent
Parameters
[in]geom_idstring Geom ID
[in]reorder_typeint Reorder type enum (see REORDER_TYPE)

◆ ResetGeomScale()

void vsp::ResetGeomScale ( const std::string & geom_id)
extern

Discard a Geom's pending scale and return it to its unscaled size. This is the Scale tab's Reset button. Use AcceptGeomScale to keep the scaled size instead.

string pid = AddGeom( "POD" );
vec3d before_max = GetGeomBBoxMax( pid, 0, false );
SetParmValUpdate( pid, "Scale", "XForm", 2.0 );
vec3d scaled_max = GetGeomBBoxMax( pid, 0, false );
if ( !closeTo( scaled_max.x(), 2.0 * before_max.x(), 1e-6 ) )
{
Print( "ERROR: the Geom was never scaled" );
__failure++;
}
// The scale factor comes back to one and the Geom returns to its base size.
if ( !closeTo( GetParmVal( pid, "Scale", "XForm" ), 1.0, 1e-9 ) )
{
Print( "ERROR: ResetGeomScale did not reset the scale factor" );
__failure++;
}
vec3d after_max = GetGeomBBoxMax( pid, 0, false );
if ( !closeTo( after_max.x(), before_max.x(), 1e-6 ) )
{
Print( "ERROR: ResetGeomScale did not undo the scaling" );
__failure++;
}
void ResetGeomScale(const std::string &geom_id)
Parameters
[in]geom_idstring Geom ID

◆ ResetPropellerThickness()

void vsp::ResetPropellerThickness ( const std::string & geom_id)
extern

Rebuild a propeller's thickness curve from the airfoils actually on its cross sections, the way the Reset Thickness button on the Prop screen does. The thickness curve normally drives the sections; this runs the relationship the other way once, so a blade built up section by section gets a thickness curve that matches what it already is.

string prop_id = AddGeom( "PROP", "" );
// The thickness curve now carries one point per cross section.
array< double > @tvec = PCurveGetTVec( prop_id, PROP_THICK );
string xsec_surf = GetXSecSurf( prop_id, 0 );
if ( tvec.size() != GetNumXSec( xsec_surf ) )
{
Print( "ERROR: ResetPropellerThickness did not rebuild the curve" );
__failure++;
}
@ PROP_THICK
void ResetPropellerThickness(const std::string &geom_id)
std::vector< double > PCurveGetTVec(const std::string &geom_id, const int &pcurveid)
int GetNumXSec(const std::string &xsec_surf_id)
See also
ApproximateAllPropellerPCurves, PCurveGetTVec
Parameters
[in]geom_idstring Propeller Geom ID

◆ SetGeomName()

void vsp::SetGeomName ( const std::string & geom_id,
const std::string & name )
extern

Set the name of the specified Geom

//==== Add Pod Geometry ====//
string pid = AddGeom( "POD", "" );
SetGeomName( pid, "ExamplePodName" );
array< string > @geom_ids = FindGeomsWithName( "ExamplePodName" );
if ( geom_ids.size() != 1 )
{
Print( "---> Error: API FindGeomsWithName " );
__failure++;
}
Parameters
[in]geom_idstring Geom ID
[in]namestring Geom name

◆ SetGeomParent()

void vsp::SetGeomParent ( const std::string & geom_id,
const std::string & parent_id )
extern

Get the parent Geom ID for the input child Geom. "NONE" is returned if the Geom has no parent.

//==== Reparent two PodGeoms ====//
string pod1 = AddGeom( "POD" );
string pod2 = AddGeom( "POD", pod1 );
string pod3 = AddGeom ("POD" );
string veh_id = GetVehicleID();
SetGeomParent( pod2, veh_id );
SetGeomParent( pod3, pod1 );
string pod2_parent = GetGeomParent( pod2 );
string pod3_parent = GetGeomParent( pod3 );
if ( pod2_parent != string("NONE") || pod3_parent != pod1 )
{
Print( "SetGeomParent error!" );
__failure++;
}
void SetGeomParent(const std::string &geom_id, const std::string &parent_id)
std::string GetVehicleID()
Parameters
[in]geom_idstring Geom ID
[in]parent_idstring Parent Geom ID

◆ SplitWingXSec()

void vsp::SplitWingXSec ( const std::string & wing_id,
int section_index )
extern

Split a given wing section.

string wing_id = AddGeom( "WING", "" );
string xsec_surf = GetXSecSurf( wing_id, 0 );
int num_start = GetNumXSec( xsec_surf );
double span_start = GetParmVal( wing_id, "Span", "XSec_1" );
//==== Set Wing Section Controls ====//
SplitWingXSec( wing_id, 1 );
// Splitting a section turns one section into two, and the two halves span
// what the one section spanned.
if ( GetNumXSec( xsec_surf ) != num_start + 1 )
{
Print( "ERROR: SplitWingXSec did not split the section" );
__failure++;
}
else
{
double span_1 = GetParmVal( wing_id, "Span", "XSec_1" );
double span_2 = GetParmVal( wing_id, "Span", "XSec_2" );
if ( !closeTo( span_1 + span_2, span_start, 1e-6 ) )
{
Print( "ERROR: SplitWingXSec changed the span of the wing" );
__failure++;
}
}
void SplitWingXSec(const std::string &wing_id, int section_index)
See also
WING_DRIVERS, XSEC_DRIVERS
Parameters
[in]wing_idstring Geom ID
[in]section_indexint Wing section index

◆ UpdateGeom()

void vsp::UpdateGeom ( const std::string & geom_id)
extern

Perform an update for the specified Geom

//==== Add Wing Geometry ====//
string wing_id = AddGeom( "WING" );
//==== Add Pod Geometry ====//
string pod_id = AddGeom( "POD" );
vec3d before_min = GetGeomBBoxMin( pod_id, 0, true );
SetParmVal( pod_id, "X_Rel_Location", "XForm", 5.0 );
UpdateGeom( pod_id ); // Faster than updating the whole vehicle
// Updating just this Geom has to move it, the same as a full Update would.
vec3d after_min = GetGeomBBoxMin( pod_id, 0, true );
if ( !closeTo( after_min.x() - before_min.x(), 5.0, 1e-6 ) )
{
Print( "ERROR: UpdateGeom did not rebuild the Geom" );
__failure++;
}
void UpdateGeom(const std::string &geom_id)
See also
Update()
Parameters
[in]geom_idstring Geom ID