This group of API functions provides capabilities related to the body of revolution (BOR) geometry type in OpenVSP. Click here to return to the main page.
More...
|
void | vsp::ChangeBORXSecShape (const string &bor_id, int type) |
|
int | vsp::GetBORXSecShape (const string &bor_id) |
|
std::vector< vec3d > | vsp::ReadBORFileXSec (const std::string &bor_id, const std::string &file_name) |
|
void | vsp::SetBORXSecPnts (const std::string &bor_id, std::vector< vec3d > &pnt_vec) |
|
vec3d | vsp::ComputeBORXSecPnt (const std::string &bor_id, double fract) |
|
vec3d | vsp::ComputeBORXSecTan (const std::string &bor_id, double fract) |
|
void | vsp::ReadBORFileAirfoil (const std::string &bor_id, const std::string &file_name) |
|
void | vsp::SetBORAirfoilUpperPnts (const std::string &bor_id, const std::vector< vec3d > &up_pnt_vec) |
|
void | vsp::SetBORAirfoilLowerPnts (const std::string &bor_id, const std::vector< vec3d > &low_pnt_vec) |
|
void | vsp::SetBORAirfoilPnts (const std::string &bor_id, const std::vector< vec3d > &up_pnt_vec, const std::vector< vec3d > &low_pnt_vec) |
|
std::vector< vec3d > | vsp::GetBORAirfoilUpperPnts (const std::string &bor_id) |
|
std::vector< vec3d > | vsp::GetBORAirfoilLowerPnts (const std::string &bor_id) |
|
std::vector< double > | vsp::GetBORUpperCSTCoefs (const std::string &bor_id) |
|
std::vector< double > | vsp::GetBORLowerCSTCoefs (const std::string &bor_id) |
|
int | vsp::GetBORUpperCSTDegree (const std::string &bor_id) |
|
int | vsp::GetBORLowerCSTDegree (const std::string &bor_id) |
|
void | vsp::SetBORUpperCST (const std::string &bor_id, int deg, const std::vector< double > &coefs) |
|
void | vsp::SetBORLowerCST (const std::string &bor_id, int deg, const std::vector< double > &coefs) |
|
void | vsp::PromoteBORCSTUpper (const std::string &bor_id) |
|
void | vsp::PromoteBORCSTLower (const std::string &bor_id) |
|
void | vsp::DemoteBORCSTUpper (const std::string &bor_id) |
|
void | vsp::DemoteBORCSTLower (const std::string &bor_id) |
|
void | vsp::FitBORAfCST (const std::string &bor_id, int deg) |
|
◆ ChangeBORXSecShape()
void vsp::ChangeBORXSecShape |
( |
const string & | bor_id, |
|
|
int | type ) |
|
extern |
Set the XSec type for a BOR component
string bor_id =
AddGeom(
"BODYOFREVOLUTION",
"" );
void ChangeBORXSecShape(const string &bor_id, int type)
int GetBORXSecShape(const string &bor_id)
std::string AddGeom(const std::string &type, const std::string &parent=std::string())
- See also
- XSEC_CRV_TYPE
- Parameters
-
[in] | bor_id | string Body of revolution Geom ID |
[in] | type | int XSec type enum (i.e. XS_ROUNDED_RECTANGLE) |
◆ ComputeBORXSecPnt()
vec3d vsp::ComputeBORXSecPnt |
( |
const std::string & | bor_id, |
|
|
double | fract ) |
|
extern |
Compute 3D coordinate for a point on a BOR XSecCurve given the parameter value (U) along the curve
string bor_id =
AddGeom(
"BODYOFREVOLUTION",
"" );
double u_fract = 0.25;
vec3d ComputeBORXSecPnt(const std::string &bor_id, double fract)
- Parameters
-
[in] | bor_id | string Body of revolution Geom ID |
[in] | fract | double Curve parameter value (range: 0 - 1) |
- Returns
- vec3d Coordinate point on curve
◆ ComputeBORXSecTan()
vec3d vsp::ComputeBORXSecTan |
( |
const std::string & | bor_id, |
|
|
double | fract ) |
|
extern |
Compute the tangent vector of a point on a BOR XSecCurve given the parameter value (U) along the curve
string bor_id =
AddGeom(
"BODYOFREVOLUTION",
"" );
double u_fract = 0.25;
vec3d ComputeBORXSecTan(const std::string &bor_id, double fract)
- Parameters
-
[in] | bor_id | string Body of revolution Geom ID |
[in] | fract | double Curve parameter value (range: 0 - 1) |
- Returns
- vec3d Tangent vector on curve
◆ DemoteBORCSTLower()
void vsp::DemoteBORCSTLower |
( |
const std::string & | bor_id | ) |
|
|
extern |
Demote the CST for the lower airfoil surface of a BOR. The XSecCurve must be of type XS_CST_AIRFOIL
- See also
- GetLowerCSTDegree
- Parameters
-
[in] | bor_id | string Body of revolution Geom ID |
◆ DemoteBORCSTUpper()
void vsp::DemoteBORCSTUpper |
( |
const std::string & | bor_id | ) |
|
|
extern |
Demote the CST for the upper airfoil surface of a BOR. The XSecCurve must be of type XS_CST_AIRFOIL
- See also
- GetUpperCSTDegree
- Parameters
-
[in] | bor_id | string Body of revolution Geom ID |
◆ FitBORAfCST()
void vsp::FitBORAfCST |
( |
const std::string & | bor_id, |
|
|
int | deg ) |
|
extern |
Fit a CST airfoil for an existing airfoil of a BOR of type XS_FOUR_SERIES, XS_SIX_SERIES, XS_FOUR_DIGIT_MOD, XS_FIVE_DIGIT, XS_FIVE_DIGIT_MOD, XS_ONE_SIX_SERIES, or XS_FILE_AIRFOIL.
- Parameters
-
[in] | bor_id | string Body of revolution Geom ID |
[in] | deg | int CST degree |
◆ GetBORAirfoilLowerPnts()
std::vector< vec3d > vsp::GetBORAirfoilLowerPnts |
( |
const std::string & | bor_id | ) |
|
|
extern |
Get the coordinate points for the lower surface of an airfoil of a BOR. The XSecCurve must be of type XS_FILE_AIRFOIL
string bor_id =
AddGeom(
"BODYOFREVOLUTION",
"" );
void ReadBORFileAirfoil(const std::string &bor_id, const std::string &file_name)
std::vector< vec3d > GetBORAirfoilLowerPnts(const std::string &bor_id)
- See also
- SetAirfoilPnts
- Parameters
-
[in] | bor_id | string Body of revolution Geom ID |
- Returns
- vector<vec3d> Vector of coordinate points for the lower airfoil surface
◆ GetBORAirfoilUpperPnts()
std::vector< vec3d > vsp::GetBORAirfoilUpperPnts |
( |
const std::string & | bor_id | ) |
|
|
extern |
Get the coordinate points for the upper surface of an airfoil on a BOR. The BOR XSecCurve must be of type XS_FILE_AIRFOIL
string bor_id =
AddGeom(
"BODYOFREVOLUTION",
"" );
std::vector< vec3d > GetBORAirfoilUpperPnts(const std::string &bor_id)
- See also
- SetAirfoilPnts
- Parameters
-
[in] | bor_id | string Body of revolution Geom ID |
- Returns
- vector<vec3d> Vector of coordinate points for the upper airfoil surface
◆ GetBORLowerCSTCoefs()
std::vector< double > vsp::GetBORLowerCSTCoefs |
( |
const std::string & | bor_id | ) |
|
|
extern |
Get the CST coefficients for the lower surface of an airfoil of a BOR. The XSecCurve must be of type XS_CST_AIRFOIL
- See also
- SetLowerCST
- Parameters
-
[in] | bor_id | string Body of revolution Geom ID |
- Returns
- vector<double> Vector of CST coefficients for the lower airfoil surface
◆ GetBORLowerCSTDegree()
int vsp::GetBORLowerCSTDegree |
( |
const std::string & | bor_id | ) |
|
|
extern |
Get the CST degree for the lower surface of an airfoil of a BOR. The XSecCurve must be of type XS_CST_AIRFOIL
- See also
- SetLowerCST
- Parameters
-
[in] | bor_id | string Body of revolution Geom ID |
- Returns
- int CST Degree for lower airfoil surface
◆ GetBORUpperCSTCoefs()
std::vector< double > vsp::GetBORUpperCSTCoefs |
( |
const std::string & | bor_id | ) |
|
|
extern |
Get the CST coefficients for the upper surface of an airfoil of a BOR. The XSecCurve must be of type XS_CST_AIRFOIL
- See also
- SetUpperCST
- Parameters
-
[in] | bor_id | Body of revolution Geom ID |
- Returns
- vector<double> Vector of CST coefficients for the upper airfoil surface
◆ GetBORUpperCSTDegree()
int vsp::GetBORUpperCSTDegree |
( |
const std::string & | bor_id | ) |
|
|
extern |
Get the CST degree for the upper surface of an airfoil of a BOR. The XSecCurve must be of type XS_CST_AIRFOIL
- See also
- SetUpperCST
- Parameters
-
[in] | bor_id | string Body of revolution Geom ID |
- Returns
- int CST Degree for upper airfoil surface
◆ GetBORXSecShape()
int vsp::GetBORXSecShape |
( |
const string & | bor_id | ) |
|
|
extern |
Get the XSec type for a BOR component
string bor_id =
AddGeom(
"BODYOFREVOLUTION",
"" );
- Parameters
-
[in] | bor_id | string Body of revolution Geom ID |
- Returns
- int XSec type enum (i.e. XS_ROUNDED_RECTANGLE)
◆ PromoteBORCSTLower()
void vsp::PromoteBORCSTLower |
( |
const std::string & | bor_id | ) |
|
|
extern |
Promote the CST for the lower airfoil surface of a BOR. The XSecCurve must be of type XS_CST_AIRFOIL
- See also
- GetLowerCSTDegree
- Parameters
-
[in] | bor_id | string Body of revolution Geom ID |
◆ PromoteBORCSTUpper()
void vsp::PromoteBORCSTUpper |
( |
const std::string & | bor_id | ) |
|
|
extern |
Promote the CST for the upper airfoil surface of a BOR. The XSecCurve must be of type XS_CST_AIRFOIL
- See also
- GetUpperCSTDegree
- Parameters
-
[in] | bor_id | string Body of revolution Geom ID |
◆ ReadBORFileAirfoil()
void vsp::ReadBORFileAirfoil |
( |
const std::string & | bor_id, |
|
|
const std::string & | file_name ) |
|
extern |
Read in shape from airfoil file and set to the specified BOR XSecCurve. The XSecCurve must be of type XS_FILE_AIRFOIL. Airfoil files may be in Lednicer or Selig format with *.af or *.dat extensions.
string bor_id =
AddGeom(
"BODYOFREVOLUTION",
"" );
- Parameters
-
[in] | bor_id | string Body of revolution Geom ID |
[in] | file_name | string Airfoil XSec file name |
◆ ReadBORFileXSec()
std::vector< vec3d > vsp::ReadBORFileXSec |
( |
const std::string & | bor_id, |
|
|
const std::string & | file_name ) |
|
extern |
Set the coordinate points for a specific BOR. The BOR XSecCurve must be of type XS_FILE_FUSE.
string bor_id =
AddGeom(
"BODYOFREVOLUTION",
"" );
std::vector< vec3d > ReadBORFileXSec(const std::string &bor_id, const std::string &file_name)
- Parameters
-
[in] | bor_id | string Body of revolution Geom ID |
[in] | file_name | string Fuselage XSec file name |
- Returns
- vector<vec3d> Array of coordinate points read from the file and set to the XSec
◆ SetBORAirfoilLowerPnts()
void vsp::SetBORAirfoilLowerPnts |
( |
const std::string & | bor_id, |
|
|
const std::vector< vec3d > & | low_pnt_vec ) |
|
extern |
Set the lower points for an airfoil on a BOR. The BOR XSecCurve must be of type XS_FILE_AIRFOIL.
string bor_id =
AddGeom(
"BODYOFREVOLUTION",
"" );
for ( int i = 0 ; i < int( low_array.size() ) ; i++ )
{
low_array[i].scale_y( 0.5 );
}
void SetBORAirfoilLowerPnts(const std::string &bor_id, const std::vector< vec3d > &low_pnt_vec)
- Parameters
-
[in] | bor_id | string Body of revolution Geom ID |
[in] | low_pnt_vec | vector<vec3d> Vector of points defining the lower surface of the airfoil |
◆ SetBORAirfoilPnts()
void vsp::SetBORAirfoilPnts |
( |
const std::string & | bor_id, |
|
|
const std::vector< vec3d > & | up_pnt_vec, |
|
|
const std::vector< vec3d > & | low_pnt_vec ) |
|
extern |
Set the upper and lower points for an airfoil on a BOR. The BOR XSecCurve must be of type XS_FILE_AIRFOIL.
string bor_id =
AddGeom(
"BODYOFREVOLUTION",
"" );
for ( int i = 0 ; i < int( up_array.size() ) ; i++ )
{
up_array[i].scale_y( 2.0 );
low_array[i].scale_y( 0.5 );
}
void SetBORAirfoilPnts(const std::string &bor_id, const std::vector< vec3d > &up_pnt_vec, const std::vector< vec3d > &low_pnt_vec)
- Parameters
-
[in] | bor_id | string Body of revolution Geom ID |
[in] | up_pnt_vec | vector<vec3d> Vector of points defining the upper surface of the airfoil |
[in] | low_pnt_vec | vector<_>vec3d> Vector of points defining the lower surface of the airfoil |
◆ SetBORAirfoilUpperPnts()
void vsp::SetBORAirfoilUpperPnts |
( |
const std::string & | bor_id, |
|
|
const std::vector< vec3d > & | up_pnt_vec ) |
|
extern |
Set the upper points for an airfoil on a BOR. The BOR XSecCurve must be of type XS_FILE_AIRFOIL.
string bor_id =
AddGeom(
"BODYOFREVOLUTION",
"" );
for ( int i = 0 ; i < int( up_array.size() ) ; i++ )
{
up_array[i].scale_y( 2.0 );
}
void SetBORAirfoilUpperPnts(const std::string &bor_id, const std::vector< vec3d > &up_pnt_vec)
- Parameters
-
[in] | bor_id | string Body of revolution Geom ID |
[in] | up_pnt_vec | vector<vec3d> Vector of points defining the upper surface of the airfoil |
◆ SetBORLowerCST()
void vsp::SetBORLowerCST |
( |
const std::string & | bor_id, |
|
|
int | deg, |
|
|
const std::vector< double > & | coefs ) |
|
extern |
Set the CST degree and coefficients for the lower surface of an airfoil of a BOR. The number of coefficients should be one more than the CST degree. The XSecCurve must be of type XS_CST_AIRFOIL
- See also
- GetLowerCSTDegree, GetLowerCSTCoefs
- Parameters
-
[in] | bor_id | string Body of revolution Geom ID |
[in] | deg | int CST degree of lower airfoil surface |
[in] | coefs | vector<double> Vector of CST coefficients for the lower airfoil surface |
◆ SetBORUpperCST()
void vsp::SetBORUpperCST |
( |
const std::string & | bor_id, |
|
|
int | deg, |
|
|
const std::vector< double > & | coefs ) |
|
extern |
Set the CST degree and coefficients for the upper surface of an airfoil of a BOR. The number of coefficients should be one more than the CST degree. The XSecCurve must be of type XS_CST_AIRFOIL
- See also
- GetUpperCSTDegree, GetUpperCSTCoefs
- Parameters
-
[in] | bor_id | string Body of revolution Geom ID |
[in] | deg | CST degree of upper airfoil surface |
[in] | coefs | Array of CST coefficients for the upper airfoil surface |
◆ SetBORXSecPnts()
void vsp::SetBORXSecPnts |
( |
const std::string & | bor_id, |
|
|
std::vector< vec3d > & | pnt_vec ) |
|
extern |
Set the coordinate points for a specific BOR. The BOR XSecCurve must be of type XS_FILE_FUSE.
string bor_id =
AddGeom(
"BODYOFREVOLUTION",
"" );
if ( vec_array.size() > 0 )
{
vec_array[1] = vec_array[1] * 2.0;
vec_array[3] = vec_array[3] * 2.0;
}
void SetBORXSecPnts(const std::string &bor_id, std::vector< vec3d > &pnt_vec)
- Parameters
-
[in] | bor_id | string Body of revolution Geom ID |
[in] | pnt_vec | vector<vec3d> Vector of XSec coordinate points |