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 | ChangeBORXSecShape (const string &in geom_id, int type) |
|
int | GetBORXSecShape (const string &in geom_id) |
|
vec3d[] | ReadBORFileXSec (const string &in bor_id, const string &in file_name) |
|
void | SetBORXSecPnts (const string &in bor_id, vec3d[]@ pnt_arr) |
|
vec3d | ComputeBORXSecPnt (const string &in bor_id, double fract) |
|
vec3d | ComputeBORXSecTan (const string &in bor_id, double fract) |
|
void | ReadBORFileAirfoil (const string &in bor_id, const string &in file_name) |
|
void | SetBORAirfoilUpperPnts (const string &in bor_id, vec3d[]@ up_pnt_vec) |
|
void | SetBORAirfoilLowerPnts (const string &in bor_id, vec3d[]@ low_pnt_vec) |
|
void | SetBORAirfoilPnts (const string &in bor_id, vec3d[]@ up_pnt_vec, vec3d[]@ low_pnt_vec) |
|
vec3d[] | GetBORAirfoilUpperPnts (const string &in bor_id) |
|
vec3d[] | GetBORAirfoilLowerPnts (const string &in bor_id) |
|
double[] | GetBORUpperCSTCoefs (const string &in bor_id) |
|
double[] | GetBORLowerCSTCoefs (const string &in bor_id) |
|
int | GetBORUpperCSTDegree (const string &in bor_id) |
|
int | GetBORLowerCSTDegree (const string &in bor_id) |
|
void | SetBORUpperCST (const string &in bor_id, int deg, double[]@ coeff_arr) |
|
void | SetBORLowerCST (const string &in bor_id, int deg, double[]@ coeff_arr) |
|
void | PromoteBORCSTUpper (const string &in bor_id) |
|
void | PromoteBORCSTLower (const string &in bor_id) |
|
void | DemoteBORCSTUpper (const string &in bor_id) |
|
void | DemoteBORCSTLower (const string &in bor_id) |
|
void | FitBORAfCST (const string &in bor_id, int deg) |
|
◆ ChangeBORXSecShape()
void ChangeBORXSecShape |
( |
const string &in |
geom_id, |
|
|
int |
type |
|
) |
| |
Set the XSec type for a BOR component
string bor_id =
AddGeom(
"BODYOFREVOLUTION",
"" );
- See also
- XSEC_CRV_TYPE
- Parameters
-
[in] | geom_id | Geom ID |
[in] | type | XSec type enum (i.e. XS_ROUNDED_RECTANGLE) |
◆ ComputeBORXSecPnt()
vec3d ComputeBORXSecPnt |
( |
const string &in |
bor_id, |
|
|
double |
fract |
|
) |
| |
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;
- Parameters
-
[in] | bor_id | Geom ID of BOR |
[in] | fract | Curve parameter value (range: 0 - 1) |
- Returns
- 3D coordinate point
◆ ComputeBORXSecTan()
vec3d ComputeBORXSecTan |
( |
const string &in |
bor_id, |
|
|
double |
fract |
|
) |
| |
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;
- Parameters
-
[in] | bor_id | Geom ID of BOR |
[in] | fract | Curve parameter value (range: 0 - 1) |
- Returns
- Tangent vector
◆ DemoteBORCSTLower()
void DemoteBORCSTLower |
( |
const string &in |
bor_id | ) |
|
Demote the CST for the lower airfoil surface of a BOR. The XSecCurve must be of type XS_CST_AIRFOIL
- See also
- GetLowerCSTDegree
- Parameters
-
◆ DemoteBORCSTUpper()
void DemoteBORCSTUpper |
( |
const string &in |
bor_id | ) |
|
Demote the CST for the upper airfoil surface of a BOR. The XSecCurve must be of type XS_CST_AIRFOIL
- See also
- GetUpperCSTDegree
- Parameters
-
◆ FitBORAfCST()
void FitBORAfCST |
( |
const string &in |
bor_id, |
|
|
int |
deg |
|
) |
| |
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 | Geom ID of BOR |
[in] | deg | CST degree |
◆ GetBORAirfoilLowerPnts()
vec3d [] GetBORAirfoilLowerPnts |
( |
const string &in |
bor_id | ) |
|
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",
"" );
- See also
- SetAirfoilPnts
- Parameters
-
- Returns
- Array of coordinate points for the lower airfoil surface
◆ GetBORAirfoilUpperPnts()
vec3d [] GetBORAirfoilUpperPnts |
( |
const string &in |
bor_id | ) |
|
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",
"" );
- See also
- SetAirfoilPnts
- Parameters
-
- Returns
- Array of coordinate points for the upper airfoil surface
◆ GetBORLowerCSTCoefs()
double [] GetBORLowerCSTCoefs |
( |
const string &in |
bor_id | ) |
|
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
-
- Returns
- Array of CST coefficients for the lower airfoil surface
◆ GetBORLowerCSTDegree()
int GetBORLowerCSTDegree |
( |
const string &in |
bor_id | ) |
|
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
-
- Returns
- CST Degree for lower airfoil surface
◆ GetBORUpperCSTCoefs()
double [] GetBORUpperCSTCoefs |
( |
const string &in |
bor_id | ) |
|
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
-
- Returns
- Array of CST coefficients for the upper airfoil surface
◆ GetBORUpperCSTDegree()
int GetBORUpperCSTDegree |
( |
const string &in |
bor_id | ) |
|
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
-
- Returns
- CST Degree for upper airfoil surface
◆ GetBORXSecShape()
int GetBORXSecShape |
( |
const string &in |
geom_id | ) |
|
Get the XSec type for a BOR component
string bor_id =
AddGeom(
"BODYOFREVOLUTION",
"" );
- Parameters
-
- Returns
- XSec type enum (i.e. XS_ROUNDED_RECTANGLE)
◆ PromoteBORCSTLower()
void PromoteBORCSTLower |
( |
const string &in |
bor_id | ) |
|
Promote the CST for the lower airfoil surface of a BOR. The XSecCurve must be of type XS_CST_AIRFOIL
- See also
- GetLowerCSTDegree
- Parameters
-
◆ PromoteBORCSTUpper()
void PromoteBORCSTUpper |
( |
const string &in |
bor_id | ) |
|
Promote the CST for the upper airfoil surface of a BOR. The XSecCurve must be of type XS_CST_AIRFOIL
- See also
- GetUpperCSTDegree
- Parameters
-
◆ ReadBORFileAirfoil()
void ReadBORFileAirfoil |
( |
const string &in |
bor_id, |
|
|
const string &in |
file_name |
|
) |
| |
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 | Geom ID of BOR |
[in] | file_name | Airfoil XSec file name |
◆ ReadBORFileXSec()
Set the coordinate points for a specific BOR. The BOR XSecCurve must be of type XS_FILE_FUSE.
string bor_id =
AddGeom(
"BODYOFREVOLUTION",
"" );
- Parameters
-
[in] | bor_id | Geom ID of BOR |
[in] | file_name | Fuselage XSec file name |
- Returns
- Array of coordinate points read from the file and set to the XSec
◆ SetBORAirfoilLowerPnts()
void SetBORAirfoilLowerPnts |
( |
const string &in |
bor_id, |
|
|
vec3d@[] |
low_pnt_vec |
|
) |
| |
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 );
}
- Parameters
-
[in] | bor_id | Geom ID of BOR |
[in] | low_pnt_vec | Array of points defining the lower surface of the airfoil |
◆ SetBORAirfoilPnts()
void SetBORAirfoilPnts |
( |
const string &in |
bor_id, |
|
|
vec3d@[] |
up_pnt_vec, |
|
|
vec3d@[] |
low_pnt_vec |
|
) |
| |
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 );
}
- Parameters
-
[in] | bor_id | Geom ID of BOR |
[in] | up_pnt_vec | Array of points defining the upper surface of the airfoil |
[in] | low_pnt_vec | Array of points defining the lower surface of the airfoil |
◆ SetBORAirfoilUpperPnts()
void SetBORAirfoilUpperPnts |
( |
const string &in |
bor_id, |
|
|
vec3d@[] |
up_pnt_vec |
|
) |
| |
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 );
}
- Parameters
-
[in] | bor_id | Geom ID of BOR |
[in] | up_pnt_vec | Array of points defining the upper surface of the airfoil |
◆ SetBORLowerCST()
void SetBORLowerCST |
( |
const string &in |
bor_id, |
|
|
int |
deg, |
|
|
double@[] |
coeff_arr |
|
) |
| |
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 | Geom ID of BOR |
[in] | deg | CST degree of lower airfoil surface |
[in] | coeff_arr | Array of CST coefficients for the lower airfoil surface |
◆ SetBORUpperCST()
void SetBORUpperCST |
( |
const string &in |
bor_id, |
|
|
int |
deg, |
|
|
double@[] |
coeff_arr |
|
) |
| |
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 | Geom ID of BOR |
[in] | deg | CST degree of upper airfoil surface |
[in] | coeff_arr | Array of CST coefficients for the upper airfoil surface |
◆ SetBORXSecPnts()
void SetBORXSecPnts |
( |
const string &in |
bor_id, |
|
|
vec3d@[] |
pnt_arr |
|
) |
| |
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;
}
- Parameters
-
[in] | bor_id | Geom ID of BOR |
[in] | pnt_arr | Array of XSec coordinate points |