3.4.0
General geometry functions.

Functions

TiglReturnCode tiglProfileGetBSplineCount (TiglCPACSConfigurationHandle cpacsHandle, const char *profileUID, int *curveCount)
 Returns the number of curves the given profile is made of. More...
 
TiglReturnCode tiglProfileGetBSplineData (TiglCPACSConfigurationHandle cpacsHandle, const char *profileUID, int curveid, int nControlPoints, double *cpx, double *cpy, double *cpz, int nKnots, double *knots)
 Returns the B-Spline data of the given profile curve. This includes the knot vector and the control points of the B-Spline. More...
 
TiglReturnCode tiglProfileGetBSplineDataSizes (TiglCPACSConfigurationHandle cpacsHandle, const char *profileUID, int curveid, int *degree, int *nControlPoints, int *nKnots)
 Returns the B-Spline data sizes for a given curve on a profile. This includes size of the knot vector, size of the control point vector and degree of the spline. More...
 

Detailed Description

Function Documentation

◆ tiglProfileGetBSplineCount()

TiglReturnCode tiglProfileGetBSplineCount ( TiglCPACSConfigurationHandle  cpacsHandle,
const char *  profileUID,
int *  curveCount 
)

Returns the number of curves the given profile is made of.

The given profile may be a fuselage profile or a wing profile. Typically, wing profiles consist of two curves (lower and upper curve), fuselage profiles consist of only one curve.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]profileUIDUID of the profile
[out]curveCountNumber of curves
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no configuration was found for the given handle
  • TIGL_UID_ERROR if profileUID is wrong
  • TIGL_NULL_POINTER if profileUID or curveCount NULL
  • TIGL_ERROR if some other error occurred

◆ tiglProfileGetBSplineData()

TiglReturnCode tiglProfileGetBSplineData ( TiglCPACSConfigurationHandle  cpacsHandle,
const char *  profileUID,
int  curveid,
int  nControlPoints,
double *  cpx,
double *  cpy,
double *  cpz,
int  nKnots,
double *  knots 
)

Returns the B-Spline data of the given profile curve. This includes the knot vector and the control points of the B-Spline.

The output arrays cpx, cpy, cpz, and knots have to be allocated by the user first. The control point vector arrays must have the size nControlPoints. This value must be queried with tiglProfileGetBSplineDataSizes first. The knot vector array must have the size kKnots. This value has to be queried also using the function tiglProfileGetBSplineDataSizes.

The given profile may be a fuselage profile or a wing profile. Typically, wing profiles consist of two curves (lower and upper curve), fuselage profiles consist of only one curve.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]profileUIDUID of the profile
[in]curveidIndex of the curve. Number of curves must be queried with tiglProfileGetBSplineCount. 1 <= index <= count
[in]nControlPointsSize of the control point vector. To be queried with tiglProfileGetBSplineDataSizes first.
[out]cpxX-values of the control point vector.
[out]cpyY-values of the control point vector.
[out]cpzZ-values of the control point vector.
[in]nKnotsSize of the knot vector. To be queried with tiglProfileGetBSplineDataSizes first.
[out]knotsKnot vector values.
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no configuration was found for the given handle
  • TIGL_UID_ERROR if profileUID is wrong
  • TIGL_INDEX_ERROR if curveid knot in range [1, curveCount]
  • TIGL_NULL_POINTER if the argument profileUID, cpx, cpy, cpz, or knots are NULL
  • TIGL_ERROR if the values nControlPoints, or nKnots are wrong

◆ tiglProfileGetBSplineDataSizes()

TiglReturnCode tiglProfileGetBSplineDataSizes ( TiglCPACSConfigurationHandle  cpacsHandle,
const char *  profileUID,
int  curveid,
int *  degree,
int *  nControlPoints,
int *  nKnots 
)

Returns the B-Spline data sizes for a given curve on a profile. This includes size of the knot vector, size of the control point vector and degree of the spline.

The given profile may be a fuselage profile or a wing profile. Typically, wing profiles consist of two curves (lower and upper curve), fuselage profiles consist of only one curve.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]profileUIDUID of the profile
[in]curveidIndex of the curve. Number of curves must be queried with tiglProfileGetBSplineCount. 1 <= index <= count
[out]degreeDegree of the B-Spline
[out]nControlPointsSize of the control point vector
[out]nKnotsSize of the knot vector
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no configuration was found for the given handle
  • TIGL_UID_ERROR if profileUID is wrong
  • TIGL_INDEX_ERROR if curveid knot in range [1, curveCount]
  • TIGL_NULL_POINTER if the argument profileUID, degree, ncontrolPoints, or nKnots are NULL
  • TIGL_ERROR if some other error occurred