OpenVSPAPI  3.23.0
Functions
Specialized Geometry Functions

These API functions are used with Geoms that need specialized treatment. Body of Recolution components are one example, which only have a single XSec to be defined from.

Click here to return to the main page. More...

Functions

void ChangeBORXSecShape (const string &in geom_id, int type)
 
int GetBORXSecShape (const string &in geom_id)
 

Detailed Description

Function Documentation

◆ ChangeBORXSecShape()

void ChangeBORXSecShape ( const string &in  geom_id,
int  type 
)

Set the XSec type for a BOR component

// Add Body of Recolution
string bor_id = AddGeom( "BODYOFREVOLUTION", "" );
if ( GetBORXSecShape( bor_id ) != XS_ROUNDED_RECTANGLE ) { Print( "ERROR: ChangeBORXSecShape" ); }
See also
XSEC_CRV_TYPE
Parameters
[in]geom_idGeom ID
[in]typeXSec type enum (i.e. XS_ROUNDED_RECTANGLE)

◆ GetBORXSecShape()

int GetBORXSecShape ( const string &in  geom_id)

Get the XSec type for a BOR component

// Add Body of Recolution
string bor_id = AddGeom( "BODYOFREVOLUTION", "" );
if ( GetBORXSecShape( bor_id ) != XS_ROUNDED_RECTANGLE ) { Print( "ERROR: GetBORXSecShape" ); }
Parameters
[in]geom_idGeom ID
Returns
XSec type enum (i.e. XS_ROUNDED_RECTANGLE)
XS_ROUNDED_RECTANGLE
@ XS_ROUNDED_RECTANGLE
Definition: openvsp_as.h:2178
GetBORXSecShape
int GetBORXSecShape(const string &in geom_id)
ChangeBORXSecShape
void ChangeBORXSecShape(const string &in geom_id, int type)
AddGeom
string AddGeom(const string &in type, const string &in parent=string())
Print
void Print(const string &in data, bool new_line=true)