TiGL  2.2.3
Functions for wing calculations

Functions

TIGL_COMMON_EXPORT TiglReturnCode tiglControlSurfaceGetDeflection (TiglCPACSConfigurationHandle cpacsHandle, const char *controlSurfaceUID, double *deflection)
 Returns the current value for the deflection of a control device. More...
 
TIGL_COMMON_EXPORT TiglReturnCode tiglControlSurfaceGetMaximumDeflection (TiglCPACSConfigurationHandle cpacsHandle, const char *controlSurfaceUID, double *maxDeflection)
 Returns the maximum value for the deflection of a control device. More...
 
TIGL_COMMON_EXPORT TiglReturnCode tiglControlSurfaceGetMinimumDeflection (TiglCPACSConfigurationHandle cpacsHandle, const char *controlSurfaceUID, double *minDeflection)
 Returns the minimum value for the deflection of a control device. More...
 
TIGL_COMMON_EXPORT TiglReturnCode tiglControlSurfaceSetDeflection (TiglCPACSConfigurationHandle cpacsHandle, const char *controlSurfaceUID, double deflection)
 Sets the current value for the deflection of a control device. More...
 
TIGL_COMMON_EXPORT TiglReturnCode tiglGetControlSurfaceCount (TiglCPACSConfigurationHandle cpacsHandle, const char *componentSegmentUID, int *numControlSurfaces)
 Returns the number of control surfaces belonging to a component segment. More...
 
TIGL_COMMON_EXPORT TiglReturnCode tiglGetControlSurfaceType (TiglCPACSConfigurationHandle cpacsHandle, const char *controlSurfaceUID, TiglControlSurfaceType *controlSurfaceType)
 Returns the type of a control surface given its UID. More...
 
TIGL_COMMON_EXPORT TiglReturnCode tiglGetControlSurfaceUID (TiglCPACSConfigurationHandle cpacsHandle, const char *componentSegmentUID, int controlSurfaceIndex, char **controlSurfaceUID)
 Returns the UID of a control surface given its index in a component segment. More...
 
TIGL_COMMON_EXPORT TiglReturnCode tiglGetWingCount (TiglCPACSConfigurationHandle cpacsHandle, int *wingCountPtr)
 Returns the number of wings in a CPACS configuration. More...
 
TIGL_COMMON_EXPORT TiglReturnCode tiglWingComponentSegmentComputeEtaIntersection (TiglCPACSConfigurationHandle cpacsHandle, const char *componentSegmentUID, double csEta1, double csXsi1, double csEta2, double csXsi2, double eta, double *xsi, TiglBoolean *hasWarning)
 Given a straight line in space defined by a pair of component segment (eta,xsi) coordinates, the function computes the intersection of the line with a component segment iso-eta line. More...
 
TIGL_COMMON_EXPORT TiglReturnCode tiglWingComponentSegmentFindSegment (TiglCPACSConfigurationHandle cpacsHandle, const char *componentSegmentUID, double x, double y, double z, char **segmentUID, char **wingUID)
 Returns the segmentUID and wingUID for a given point on a componentSegment. The returned strings must not be freed by the user anymore. More...
 
TIGL_COMMON_EXPORT TiglReturnCode tiglWingComponentSegmentGetNumberOfSegments (TiglCPACSConfigurationHandle cpacsHandle, const char *componentSegmentUID, int *nsegments)
 Returns the number of segments belonging to a component segment. More...
 
TIGL_COMMON_EXPORT TiglReturnCode tiglWingComponentSegmentGetPoint (TiglCPACSConfigurationHandle cpacsHandle, const char *componentSegmentUID, double eta, double xsi, double *x, double *y, double *z)
 Returns x,y,z koordinates for a given eta and xsi on a componentSegment. More...
 
TIGL_COMMON_EXPORT TiglReturnCode tiglWingComponentSegmentGetSegmentIntersection (TiglCPACSConfigurationHandle cpacsHandle, const char *componentSegmentUID, const char *segmentUID, double csEta1, double csXsi1, double csEta2, double csXsi2, double segmentEta, double *segmentXsi, TiglBoolean *hasWarning)
 Computes the intersection of a line (defined by component segment coordinates) with an iso-eta line on a specified wing segment. More...
 
TIGL_COMMON_EXPORT TiglReturnCode tiglWingComponentSegmentGetSegmentUID (TiglCPACSConfigurationHandle cpacsHandle, const char *componentSegmentUID, int segmentIndex, char **segmentUID)
 Returns the segment UID of a segment belonging to a component segment. The segment is specified with its index, which is in the 1...nsegments. The number of segments nsegments can be queried with tiglWingComponentSegmentGetNumberOfSegments. More...
 
TIGL_COMMON_EXPORT TiglReturnCode tiglWingComponentSegmentPointGetSegmentEtaXsi (TiglCPACSConfigurationHandle cpacsHandle, const char *componentSegmentUID, double eta, double xsi, char **wingUID, char **segmentUID, double *segmentEta, double *segmentXsi, double *errorDistance)
 Returns eta, xsi, segmentUID and wingUID for a given eta and xsi on a componentSegment. More...
 
TIGL_COMMON_EXPORT TiglReturnCode tiglWingGetChordNormal (TiglCPACSConfigurationHandle cpacsHandle, int wingIndex, int segmentIndex, double eta, double xsi, double *normalXPtr, double *normalYPtr, double *normalZPtr)
 Returns a normal vector on the wing chord surface for a a given wing and segment index. More...
 
TIGL_COMMON_EXPORT TiglReturnCode tiglWingGetChordPoint (TiglCPACSConfigurationHandle cpacsHandle, int wingIndex, int segmentIndex, double eta, double xsi, double *pointXPtr, double *pointYPtr, double *pointZPtr)
 Returns a point on the wing chord surface for a a given wing and segment index. More...
 
TIGL_COMMON_EXPORT TiglReturnCode tiglWingGetComponentSegmentCount (TiglCPACSConfigurationHandle cpacsHandle, int wingIndex, int *compSegmentCountPtr)
 Returns the number of component segments for a wing in a CPACS configuration. More...
 
TIGL_COMMON_EXPORT TiglReturnCode tiglWingGetComponentSegmentIndex (TiglCPACSConfigurationHandle cpacsHandle, int wingIndex, const char *compSegmentUID, int *segmentIndexPtr)
 Returns the Index of a component segment of a wing. More...
 
TIGL_COMMON_EXPORT TiglReturnCode tiglWingGetComponentSegmentUID (TiglCPACSConfigurationHandle cpacsHandle, int wingIndex, int compSegmentIndex, char **uidNamePtr)
 Returns the UID of a component segment of a wing. The string returned must not be deleted by the caller via free(). It will be deleted when the CPACS configuration is closed. More...
 
TIGL_COMMON_EXPORT TiglReturnCode tiglWingGetIndex (TiglCPACSConfigurationHandle cpacsHandle, const char *wingUID, int *wingIndexPtr)
 Returns the Index of a wing. More...
 
TIGL_COMMON_EXPORT TiglReturnCode tiglWingGetInnerConnectedSegmentCount (TiglCPACSConfigurationHandle cpacsHandle, int wingIndex, int segmentIndex, int *segmentCountPtr)
 Returns the count of wing segments connected to the inner section of a given segment. More...
 
TIGL_COMMON_EXPORT TiglReturnCode tiglWingGetInnerConnectedSegmentIndex (TiglCPACSConfigurationHandle cpacsHandle, int wingIndex, int segmentIndex, int n, int *connectedIndexPtr)
 Returns the index (number) of the n-th wing segment connected to the inner section of a given segment. n starts at 1. More...
 
TIGL_COMMON_EXPORT TiglReturnCode tiglWingGetInnerSectionAndElementIndex (TiglCPACSConfigurationHandle cpacsHandle, int wingIndex, int segmentIndex, int *sectionIndexPtr, int *elementIndexPtr)
 Returns the section index and section element index of the inner side of a given wing segment. More...
 
TIGL_COMMON_EXPORT TiglReturnCode tiglWingGetInnerSectionAndElementUID (TiglCPACSConfigurationHandle cpacsHandle, int wingIndex, int segmentIndex, char **sectionUIDPtr, char **elementUIDPtr)
 Returns the section UID and section element UID of the inner side of a given wing segment. More...
 
TIGL_COMMON_EXPORT TiglReturnCode tiglWingGetLowerPoint (TiglCPACSConfigurationHandle cpacsHandle, int wingIndex, int segmentIndex, double eta, double xsi, double *pointXPtr, double *pointYPtr, double *pointZPtr)
 Returns a point on the lower wing surface for a a given wing and segment index. More...
 
TIGL_COMMON_EXPORT TiglReturnCode tiglWingGetLowerPointAtDirection (TiglCPACSConfigurationHandle cpacsHandle, int wingIndex, int segmentIndex, double eta, double xsi, double dirx, double diry, double dirz, double *pointXPtr, double *pointYPtr, double *pointZPtr, double *errorDistance)
 Returns a point on the lower wing surface for a a given wing and segment index. This function is different from tiglWingGetLowerPoint: First, a point on the wing chord surface is computed (defined by segment index and eta,xsi). Then, a line is constructed, which is defined by this point and a direction given by the user. The intersection of this line with the lower wing surface is finally returned. The point is returned in absolute world coordinates. More...
 
TIGL_COMMON_EXPORT TiglReturnCode tiglWingGetOuterConnectedSegmentCount (TiglCPACSConfigurationHandle cpacsHandle, int wingIndex, int segmentIndex, int *segmentCountPtr)
 Returns the count of wing segments connected to the outer section of a given segment. More...
 
TIGL_COMMON_EXPORT TiglReturnCode tiglWingGetOuterConnectedSegmentIndex (TiglCPACSConfigurationHandle cpacsHandle, int wingIndex, int segmentIndex, int n, int *connectedIndexPtr)
 Returns the index (number) of the n-th wing segment connected to the outer section of a given segment. n starts at 1. More...
 
TIGL_COMMON_EXPORT TiglReturnCode tiglWingGetOuterSectionAndElementIndex (TiglCPACSConfigurationHandle cpacsHandle, int wingIndex, int segmentIndex, int *sectionIndexPtr, int *elementIndexPtr)
 Returns the section index and section element index of the outer side of a given wing segment. More...
 
TIGL_COMMON_EXPORT TiglReturnCode tiglWingGetOuterSectionAndElementUID (TiglCPACSConfigurationHandle cpacsHandle, int wingIndex, int segmentIndex, char **sectionUIDPtr, char **elementUIDPtr)
 Returns the section UID and section element UID of the outer side of a given wing segment. More...
 
TIGL_COMMON_EXPORT TiglReturnCode tiglWingGetProfileName (TiglCPACSConfigurationHandle cpacsHandle, int wingIndex, int sectionIndex, int elementIndex, char **profileNamePtr)
 Returns the name of a wing profile. The string returned must not be deleted by the caller via free(). It will be deleted when the CPACS configuration is closed. More...
 
TIGL_COMMON_EXPORT TiglReturnCode tiglWingGetSectionCount (TiglCPACSConfigurationHandle cpacsHandle, int wingIndex, int *sectionCount)
 Returns the number of sections of a wing. More...
 
TIGL_COMMON_EXPORT TiglReturnCode tiglWingGetSectionUID (TiglCPACSConfigurationHandle cpacsHandle, int wingIndex, int sectionIndex, char **uidNamePtr)
 Returns the UID of a section of a wing. The string returned must not be deleted by the caller via free(). It will be deleted when the CPACS configuration is closed. More...
 
TIGL_COMMON_EXPORT TiglReturnCode tiglWingGetSegmentCount (TiglCPACSConfigurationHandle cpacsHandle, int wingIndex, int *segmentCountPtr)
 Returns the number of segments for a wing in a CPACS configuration. More...
 
TIGL_COMMON_EXPORT TiglReturnCode tiglWingGetSegmentEtaXsi (TiglCPACSConfigurationHandle cpacsHandle, int wingIndex, double pointX, double pointY, double pointZ, int *segmentIndex, double *eta, double *xsi, int *isOnTop)
 Inverse function to tiglWingGetLowerPoint and tiglWingGetLowerPoint. Calculates to a point (x,y,z) in global coordinates the wing segment coordinates and the wing segment index. More...
 
TIGL_COMMON_EXPORT TiglReturnCode tiglWingGetSegmentIndex (TiglCPACSConfigurationHandle cpacsHandle, const char *segmentUID, int *segmentIndexPtr, int *wingIndexPtr)
 Returns the Index of a segment of a wing. More...
 
TIGL_COMMON_EXPORT TiglReturnCode tiglWingGetSegmentUID (TiglCPACSConfigurationHandle cpacsHandle, int wingIndex, int segmentIndex, char **uidNamePtr)
 Returns the UID of a segment of a wing. The string returned must not be deleted by the caller via free(). It will be deleted when the CPACS configuration is closed. More...
 
TIGL_COMMON_EXPORT TiglReturnCode tiglWingGetSymmetry (TiglCPACSConfigurationHandle cpacsHandle, int wingIndex, TiglSymmetryAxis *symmetryAxisPtr)
 Returns the Symmetry Enum if the wing has symmetry-axis. More...
 
TIGL_COMMON_EXPORT TiglReturnCode tiglWingGetUID (TiglCPACSConfigurationHandle cpacsHandle, int wingIndex, char **uidNamePtr)
 Returns the UID of a wing. The string returned must not be deleted by the caller via free(). It will be deleted when the CPACS configuration is closed. More...
 
TIGL_COMMON_EXPORT TiglReturnCode tiglWingGetUpperPoint (TiglCPACSConfigurationHandle cpacsHandle, int wingIndex, int segmentIndex, double eta, double xsi, double *pointXPtr, double *pointYPtr, double *pointZPtr)
 Returns a point on the upper wing surface for a a given wing and segment index. More...
 
TIGL_COMMON_EXPORT TiglReturnCode tiglWingGetUpperPointAtDirection (TiglCPACSConfigurationHandle cpacsHandle, int wingIndex, int segmentIndex, double eta, double xsi, double dirx, double diry, double dirz, double *pointXPtr, double *pointYPtr, double *pointZPtr, double *errorDistance)
 Returns a point on the upper wing surface for a a given wing and segment index. This function is different from tiglWingGetUpperPoint: First, a point on the wing chord surface is computed (defined by segment index and eta,xsi). Then, a line is constructed, which is defined by this point and a direction given by the user. The intersection of this line with the upper wing surface is finally returned. The point is returned in absolute world coordinates. More...
 
TIGL_COMMON_EXPORT TiglReturnCode tiglWingSegmentPointGetComponentSegmentEtaXsi (TiglCPACSConfigurationHandle cpacsHandle, const char *segmentUID, const char *componentSegmentUID, double segmentEta, double segmentXsi, double *eta, double *xsi)
 Returns eta, xsi coordinates of a componentSegment given segmentEta and segmentXsi on a wing segment. More...
 

Detailed Description

Function to handle wing geometry's with TIGL.

Function Documentation

TIGL_COMMON_EXPORT TiglReturnCode tiglControlSurfaceGetDeflection ( TiglCPACSConfigurationHandle  cpacsHandle,
const char *  controlSurfaceUID,
double *  deflection 
)

Returns the current value for the deflection of a control device.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]controlSurfaceUIDUID of the control surface
[out]deflectionValue for the deflection
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no configuration was found for the given handle
  • TIGL_UID_ERROR if the control surface does not exist
  • TIGL_NULL_POINTER if deflection is a NULL pointer
  • TIGL_ERROR if some other error occurred
TIGL_COMMON_EXPORT TiglReturnCode tiglControlSurfaceGetMaximumDeflection ( TiglCPACSConfigurationHandle  cpacsHandle,
const char *  controlSurfaceUID,
double *  maxDeflection 
)

Returns the maximum value for the deflection of a control device.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]controlSurfaceUIDUID of the control surface
[out]maxDeflectionMaximum value for the deflection
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no configuration was found for the given handle
  • TIGL_UID_ERROR if the control surface does not exist
  • TIGL_NULL_POINTER if maxDeflection is a NULL pointer
  • TIGL_ERROR if some other error occurred
TIGL_COMMON_EXPORT TiglReturnCode tiglControlSurfaceGetMinimumDeflection ( TiglCPACSConfigurationHandle  cpacsHandle,
const char *  controlSurfaceUID,
double *  minDeflection 
)

Returns the minimum value for the deflection of a control device.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]controlSurfaceUIDUID of the control surface
[out]minDeflectionMinimum value for the deflection
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no configuration was found for the given handle
  • TIGL_UID_ERROR if the control surface does not exist
  • TIGL_NULL_POINTER if minDeflection is a NULL pointer
  • TIGL_ERROR if some other error occurred
TIGL_COMMON_EXPORT TiglReturnCode tiglControlSurfaceSetDeflection ( TiglCPACSConfigurationHandle  cpacsHandle,
const char *  controlSurfaceUID,
double  deflection 
)

Sets the current value for the deflection of a control device.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]controlSurfaceUIDUID of the control surface
[out]deflectionValue for the deflection
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no configuration was found for the given handle
  • TIGL_UID_ERROR if the control surface does not exist
  • TIGL_ERROR if some other error occurred
TIGL_COMMON_EXPORT TiglReturnCode tiglGetControlSurfaceCount ( TiglCPACSConfigurationHandle  cpacsHandle,
const char *  componentSegmentUID,
int *  numControlSurfaces 
)

Returns the number of control surfaces belonging to a component segment.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]componentSegmentUIDUID of the componentSegment
[out]numControlSurfacesnumber of control surfaces of the componentSegment
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no configuration was found for the given handle
  • TIGL_UID_ERROR if the component segment does not exist
  • TIGL_NULL_POINTER if either the componentSegmentUID or numControlSurfaces are NULL pointers
  • TIGL_ERROR if some other error occurred
TIGL_COMMON_EXPORT TiglReturnCode tiglGetControlSurfaceType ( TiglCPACSConfigurationHandle  cpacsHandle,
const char *  controlSurfaceUID,
TiglControlSurfaceType controlSurfaceType 
)

Returns the type of a control surface given its UID.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]controlSurfaceUIDUID of the control surface
[out]controlSurfaceTypeType of the control surface
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no configuration was found for the given handle
  • TIGL_UID_ERROR if the control surface does not exist
  • TIGL_NULL_POINTER if controlSurfaceUID is a NULL pointer
  • TIGL_ERROR if some other error occurred
TIGL_COMMON_EXPORT TiglReturnCode tiglGetControlSurfaceUID ( TiglCPACSConfigurationHandle  cpacsHandle,
const char *  componentSegmentUID,
int  controlSurfaceIndex,
char **  controlSurfaceUID 
)

Returns the UID of a control surface given its index in a component segment.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]componentSegmentUIDUID of the componentSegment
[in]controlSurfaceIndexIndex of the control surface, starting at 1
[out]controlSurfaceUIDUID of the control surface
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no configuration was found for the given handle
  • TIGL_UID_ERROR if the component segment does not exist
  • TIGL_NULL_POINTER if either the componentSegmentUID or controlSurfaceUID are NULL pointers
  • TIGL_INDEX_ERROR if the control surface index is invalid
  • TIGL_ERROR if some other error occurred
TIGL_COMMON_EXPORT TiglReturnCode tiglGetWingCount ( TiglCPACSConfigurationHandle  cpacsHandle,
int *  wingCountPtr 
)

Returns the number of wings in a CPACS configuration.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[out]wingCountPtrPointer to the number of wings
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no configuration was found for the given handle
  • TIGL_NULL_POINTER if wingCountPtr is a null pointer
  • TIGL_ERROR if some other error occurred
TIGL_COMMON_EXPORT TiglReturnCode tiglWingComponentSegmentComputeEtaIntersection ( TiglCPACSConfigurationHandle  cpacsHandle,
const char *  componentSegmentUID,
double  csEta1,
double  csXsi1,
double  csEta2,
double  csXsi2,
double  eta,
double *  xsi,
TiglBoolean hasWarning 
)

Given a straight line in space defined by a pair of component segment (eta,xsi) coordinates, the function computes the intersection of the line with a component segment iso-eta line.

The function is similar to tiglWingComponentSegmentGetSegmentIntersection, with the difference, that an iso-line of the component segment is used instead of an iso-line of a segment. The line is defined by its inner and outer point, both given in component segment coordinates. Typically, these might be spar positions or leading edge coordinates of flaps. The eta value for the iso-eta line should be in the range [csEta1, csEta2]. The function returns the xsi coordinate (depth coordinate) of the intersection point. This coordinate is given in the component segment coordinate system. See image below for details.

compseg-intersect.png
Computation of the component segment interpolation point.
Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]componentSegmentUIDUID of the componentSegment
[in]csEta1,csEta2Start and end eta coordinates of the intersection line (given as component segment coordinates)
[in]csXsi1,csXsi2Start and end xsi coordinates of the intersection line (given as component segment coordinates)
[in]etaEta coordinate of the iso-eta component segment intersection line
[out]xsiXsi coordinate of the intersection point on the wing component segment
[out]hasWarningThe hasWarning flag is true (1), if the resulting xsi value is either outside the valid range [0,1]. It is up to the user to handle these cases properly. This flag is only valid, if the function returns TIGL_SUCCESS.
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no configuration was found for the given handle
  • TIGL_UID_ERROR if the segment or the component segment does not exist
  • TIGL_MATH_ERROR if the intersection could not be computed (e.g. if no intersection exists)
  • TIGL_NULL_POINTER if componentSegmentUID or xsi are null pointers
  • TIGL_ERROR if some other error occurred
TIGL_COMMON_EXPORT TiglReturnCode tiglWingComponentSegmentFindSegment ( TiglCPACSConfigurationHandle  cpacsHandle,
const char *  componentSegmentUID,
double  x,
double  y,
double  z,
char **  segmentUID,
char **  wingUID 
)

Returns the segmentUID and wingUID for a given point on a componentSegment. The returned strings must not be freed by the user anymore.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]componentSegmentUIDUID of the componentSegment to search for
[in]x,y,zCoordinates of the point of the componentSegment
[out]segmentUIDUID of the segment that fits to the given point and componentSegment. In contrast to old releases, the returned string must not be freed by the user!
[out]wingUIDUID of the wing that fits to the given point and componentSegment In contrast to old releases, the returned string must not be freed by the user!
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no configuration was found for the given handle
  • TIGL_NOT_FOUND if the point does not lie on the wing component segment within 1cm tolerance.
  • TIGL_INDEX_ERROR if wingIndex is less or equal zero
  • TIGL_ERROR if some other error occurred
TIGL_COMMON_EXPORT TiglReturnCode tiglWingComponentSegmentGetNumberOfSegments ( TiglCPACSConfigurationHandle  cpacsHandle,
const char *  componentSegmentUID,
int *  nsegments 
)

Returns the number of segments belonging to a component segment.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]componentSegmentUIDUID of the componentSegment
[out]nsegmentsNumber of segments belonging to the component segment
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no configuration was found for the given handle
  • TIGL_UID_ERROR if the component segment does not exist
  • TIGL_ERROR if some other error occurred
TIGL_COMMON_EXPORT TiglReturnCode tiglWingComponentSegmentGetPoint ( TiglCPACSConfigurationHandle  cpacsHandle,
const char *  componentSegmentUID,
double  eta,
double  xsi,
double *  x,
double *  y,
double *  z 
)

Returns x,y,z koordinates for a given eta and xsi on a componentSegment.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]componentSegmentUIDUID of the componentSegment to search for
[in]eta,xsiEta and Xsi of the point of the componentSegment
[out]xX coordinate of the point on the corresponding segment.
[out]yY coordinate of the point on the corresponding segment.
[out]zZ coordinate of the point on the corresponding segment.
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no configuration was found for the given handle
  • TIGL_UID_ERROR if the componentSegment does not exist
  • TIGL_ERROR if some other error occurred
TIGL_COMMON_EXPORT TiglReturnCode tiglWingComponentSegmentGetSegmentIntersection ( TiglCPACSConfigurationHandle  cpacsHandle,
const char *  componentSegmentUID,
const char *  segmentUID,
double  csEta1,
double  csXsi1,
double  csEta2,
double  csXsi2,
double  segmentEta,
double *  segmentXsi,
TiglBoolean hasWarning 
)

Computes the intersection of a line (defined by component segment coordinates) with an iso-eta line on a specified wing segment.

The component segment line is defined by its inner and outer point, both defined in component segment coordinates. Typically, these might be spar positions or leading edge coordinates of flaps. The segment line is defined by a iso-eta line. Typically, the intersection with a wing section would be computed (i.e. eta=1 or eta=0). The function returns the xsi coordinate (depth coordinate) of the intersection point. This coordinate is given in the segment coordinate system. See image below for details.

segment-compseg-intersect.png
Computation of the component segment - segment intersection point.
Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]componentSegmentUIDUID of the componentSegment
[in]segmentUIDUID of the segment, the intersection should be calculated with
[in]csEta1,csEta2Start and end eta coordinates of the intersection line (given as component segment coordinates)
[in]csXsi1,csXsi2Start and end xsi coordinates of the intersection line (given as component segment coordinates)
[in]segmentEtaEta coordinate of the iso-eta segment intersection line
[out]segmentXsiXsi coordinate of the intersection point on the wing segment
[out]hasWarningThe hasWarning flag is true (1), if the resulting xsi value is outside the valid range [0,1]. It is up to the user to handle these cases properly. This flag is only valid, if the function returns TIGL_SUCCESS.
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no configuration was found for the given handle
  • TIGL_UID_ERROR if the segment or the component segment does not exist
  • TIGL_MATH_ERROR if the intersection could not be computed (e.g. if no intersection exists)
  • TIGL_ERROR if some other error occurred
TIGL_COMMON_EXPORT TiglReturnCode tiglWingComponentSegmentGetSegmentUID ( TiglCPACSConfigurationHandle  cpacsHandle,
const char *  componentSegmentUID,
int  segmentIndex,
char **  segmentUID 
)

Returns the segment UID of a segment belonging to a component segment. The segment is specified with its index, which is in the 1...nsegments. The number of segments nsegments can be queried with tiglWingComponentSegmentGetNumberOfSegments.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]componentSegmentUIDUID of the componentSegment
[in]segmentIndexIndex of the segment (1 <= index <= nsegments)
[out]segmentUIDUID of the segment
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no configuration was found for the given handle
  • TIGL_UID_ERROR if the component segment does not exist
  • TIGL_INDEX_ERROR if the segment index is invalid
  • TIGL_ERROR if some other error occurred
TIGL_COMMON_EXPORT TiglReturnCode tiglWingComponentSegmentPointGetSegmentEtaXsi ( TiglCPACSConfigurationHandle  cpacsHandle,
const char *  componentSegmentUID,
double  eta,
double  xsi,
char **  wingUID,
char **  segmentUID,
double *  segmentEta,
double *  segmentXsi,
double *  errorDistance 
)

Returns eta, xsi, segmentUID and wingUID for a given eta and xsi on a componentSegment.

If the given component segment point lies outside the wing chord surface, the function returns an error distance > 0. If this distance is larger than 1 mm, the point is first projected onto the segment (see image). Then, this point is transformed into segment coordinates. It is up to the user to handle this case correctly.

compseg-getetaxsi.png
If the given point (black) lies outside the wing chord surface, it will be projected onto the wing (red).
Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]componentSegmentUIDUID of the componentSegment to search for
[in]eta,xsiEta and Xsi of the point of the componentSegment
[out]wingUIDUID of the wing that fits to the given point and componentSegment. In contrast to old releases, the returned string must not be freed by the user!
[out]segmentUIDUID of the segment that fits to the given point and componentSegment. In contrast to old releases, the returned string must not be freed by the user!
[out]segmentEtaEta of the point on the corresponding segment.
[out]segmentXsiXsi of the point on the corresponding segment.
[out]errorDistanceIf the point given in component segment lies outside the wing chord surface this paramter returns the distance of the point to the nearest point on the wing. Normally, this should be zero! In older releases, an error was generated if this distance was larger than 1 cm. Now, it is up to the user to handle this case.
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no configuration was found for the given handle
  • TIGL_UID_ERROR if the componentSegment does not exist
  • TIGL_MATH_ERROR if the given wing component segment point can not be transformed into a segment point. This might happen, if the component segment contains twisted section.
  • TIGL_ERROR if some other error occurred
TIGL_COMMON_EXPORT TiglReturnCode tiglWingGetChordNormal ( TiglCPACSConfigurationHandle  cpacsHandle,
int  wingIndex,
int  segmentIndex,
double  eta,
double  xsi,
double *  normalXPtr,
double *  normalYPtr,
double *  normalZPtr 
)

Returns a normal vector on the wing chord surface for a a given wing and segment index.

Returns a normal vector on the wing chord surface in dependence of parameters eta and xsi, which range from 0.0 to 1.0.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]wingIndexThe index of the wing, starting at 1
[in]segmentIndexThe index of the segment of the wing, starting at 1
[in]etaeta in the range 0.0 <= eta <= 1.0
[in]xsixsi in the range 0.0 <= xsi <= 1.0
[out]normalXPtrPointer to the x-coordinate of the resulting normal vector
[out]normalYPtrPointer to the y-coordinate of the resulting normal vector
[out]normalZPtrPointer to the z-coordinate of the resulting normal vector
Returns
  • TIGL_SUCCESS if a point was found
  • TIGL_NOT_FOUND if cpacs handle is not valid
  • TIGL_INDEX_ERROR if wingIndex or segmentIndex are not valid
  • TIGL_NULL_POINTER if normalXPtr, normalYPtr or normalZPtr are null pointers
  • TIGL_ERROR if some other error occured
TIGL_COMMON_EXPORT TiglReturnCode tiglWingGetChordPoint ( TiglCPACSConfigurationHandle  cpacsHandle,
int  wingIndex,
int  segmentIndex,
double  eta,
double  xsi,
double *  pointXPtr,
double *  pointYPtr,
double *  pointZPtr 
)

Returns a point on the wing chord surface for a a given wing and segment index.

Returns a point on the wing chord surface in dependence of parameters eta and xsi, which range from 0.0 to 1.0. For eta = 0.0, xsi = 0.0 the point is equal to the leading edge on the inner section of the given segment. For eta = 1.0, xsi = 1.0 the point is equal to the trailing edge on the outer section of the given segment. The point is returned in absolute world coordinates.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]wingIndexThe index of the wing, starting at 1
[in]segmentIndexThe index of the segment of the wing, starting at 1
[in]etaeta in the range 0.0 <= eta <= 1.0
[in]xsixsi in the range 0.0 <= xsi <= 1.0
[out]pointXPtrPointer to the x-coordinate of the point in absolute world coordinates
[out]pointYPtrPointer to the y-coordinate of the point in absolute world coordinates
[out]pointZPtrPointer to the z-coordinate of the point in absolute world coordinates
Returns
  • TIGL_SUCCESS if a point was found
  • TIGL_NOT_FOUND if cpacs handle is not valid
  • TIGL_INDEX_ERROR if wingIndex or segmentIndex are not valid
  • TIGL_NULL_POINTER if pointXPtr, pointYPtr or pointZPtr are null pointers
  • TIGL_ERROR if some other error occured
TIGL_COMMON_EXPORT TiglReturnCode tiglWingGetComponentSegmentCount ( TiglCPACSConfigurationHandle  cpacsHandle,
int  wingIndex,
int *  compSegmentCountPtr 
)

Returns the number of component segments for a wing in a CPACS configuration.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]wingIndexThe index of the wing, starting at 1
[out]compSegmentCountPtrPointer to the number of component segments
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no configuration was found for the given handle
  • TIGL_INDEX_ERROR if wingIndex is not valid
  • TIGL_NULL_POINTER if compSegmentCountPtr is a null pointer
  • TIGL_ERROR if some other error occurred
TIGL_COMMON_EXPORT TiglReturnCode tiglWingGetComponentSegmentIndex ( TiglCPACSConfigurationHandle  cpacsHandle,
int  wingIndex,
const char *  compSegmentUID,
int *  segmentIndexPtr 
)

Returns the Index of a component segment of a wing.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]wingIndexThe index of a wing, starting at 1
[in]compSegmentUIDThe uid of the wing
[out]segmentIndexPtrThe index of a segment, starting at 1

Usage example:

   TiglReturnCode returnCode;
   int segmentIndex;
   returnCode = tiglWingGetComponentSegmentIndex(cpacsHandle, wing, uidName, &segmentIndex);
   printf("The Index of the component segment of wing %d is %d\n", wing, segmentIndex);
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no configuration was found for the given handle
  • TIGL_INDEX_ERROR if wingIndex is not valid
  • TIGL_UID_ERROR if the compSegmentUID does not exist
  • TIGL_NULL_POINTER if compSegmentUID is a null pointer
  • TIGL_ERROR if some other error occurred
TIGL_COMMON_EXPORT TiglReturnCode tiglWingGetComponentSegmentUID ( TiglCPACSConfigurationHandle  cpacsHandle,
int  wingIndex,
int  compSegmentIndex,
char **  uidNamePtr 
)

Returns the UID of a component segment of a wing. The string returned must not be deleted by the caller via free(). It will be deleted when the CPACS configuration is closed.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]wingIndexThe index of a wing, starting at 1
[in]compSegmentIndexThe index of a segment, starting at 1
[out]uidNamePtrThe uid of the wing

Usage example:

   TiglReturnCode returnCode;
   char* uidPtr = 0;
   returnCode = tiglWingGetComponentSegmentUID(cpacsHandle, wing, segmentID, &uidPtr);
   printf("The UID of the component segment of wing %d is %s\n", wing, uidPtr);
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no configuration was found for the given handle
  • TIGL_INDEX_ERROR if wingIndex or the compSegmentIndex are not valid
  • TIGL_NULL_POINTER if uidNamePtr is a null pointer
  • TIGL_ERROR if some other error occurred
TIGL_COMMON_EXPORT TiglReturnCode tiglWingGetIndex ( TiglCPACSConfigurationHandle  cpacsHandle,
const char *  wingUID,
int *  wingIndexPtr 
)

Returns the Index of a wing.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]wingUIDThe uid of the wing
[out]wingIndexPtrThe index of a wing, starting at 1

Usage example:

   TiglReturnCode returnCode;
   int wingIndex;
   returnCode = tiglWingGetUID(cpacsHandle, wingUID, &wingIndex);
   printf("The Index of the wing is %d\n", wingIndex);
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no configuration was found for the given handle
  • TIGL_UID_ERROR if wingUID does not exist
  • TIGL_NULL_POINTER if wingUID is a null pointer
  • TIGL_ERROR if some other error occurred
TIGL_COMMON_EXPORT TiglReturnCode tiglWingGetInnerConnectedSegmentCount ( TiglCPACSConfigurationHandle  cpacsHandle,
int  wingIndex,
int  segmentIndex,
int *  segmentCountPtr 
)

Returns the count of wing segments connected to the inner section of a given segment.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]wingIndexThe index of a wing, starting at 1
[in]segmentIndexThe index of a segment, starting at 1
[out]segmentCountPtrPointer to the count of connected segments
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no configuration was found for the given handle
  • TIGL_INDEX_ERROR if wingIndex or segmentIndex are not valid
  • TIGL_NULL_POINTER if segmentCountPtr is a null pointer
  • TIGL_ERROR if some other error occurred
TIGL_COMMON_EXPORT TiglReturnCode tiglWingGetInnerConnectedSegmentIndex ( TiglCPACSConfigurationHandle  cpacsHandle,
int  wingIndex,
int  segmentIndex,
int  n,
int *  connectedIndexPtr 
)

Returns the index (number) of the n-th wing segment connected to the inner section of a given segment. n starts at 1.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]wingIndexThe index of a wing, starting at 1
[in]segmentIndexThe index of a segment, starting at 1
[in]nn-th segment searched, 1 <= n <= tiglWingGetInnerConnectedSegmentCount(...)
[out]connectedIndexPtrPointer to the segment index of the n-th connected segment
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no configuration was found for the given handle or no n-th connected segment was found
  • TIGL_INDEX_ERROR if wingIndex, segmentIndex or n are not valid
  • TIGL_NULL_POINTER if segmentIndexPtr is a null pointer
  • TIGL_ERROR if some other error occured
TIGL_COMMON_EXPORT TiglReturnCode tiglWingGetInnerSectionAndElementIndex ( TiglCPACSConfigurationHandle  cpacsHandle,
int  wingIndex,
int  segmentIndex,
int *  sectionIndexPtr,
int *  elementIndexPtr 
)

Returns the section index and section element index of the inner side of a given wing segment.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]wingIndexThe index of a wing, starting at 1
[in]segmentIndexThe index of a segment, starting at 1
[out]sectionIndexPtrThe section index of the inner side
[out]elementIndexPtrThe section element index of the inner side
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no configuration was found for the given handle
  • TIGL_INDEX_ERROR if wingIndex or segmentIndex are not valid
  • TIGL_NULL_POINTER if sectionIndexPtr or elementIndexPtr are a null pointer
  • TIGL_ERROR if some other error occurred
TIGL_COMMON_EXPORT TiglReturnCode tiglWingGetInnerSectionAndElementUID ( TiglCPACSConfigurationHandle  cpacsHandle,
int  wingIndex,
int  segmentIndex,
char **  sectionUIDPtr,
char **  elementUIDPtr 
)

Returns the section UID and section element UID of the inner side of a given wing segment.

Important change: The memory necessary for the two UIDs must not be freed by the user anymore.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]wingIndexThe index of a wing, starting at 1
[in]segmentIndexThe index of a segment, starting at 1
[out]sectionUIDPtrThe section UID of the inner side
[out]elementUIDPtrThe section element UID of the inner side
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no configuration was found for the given handle
  • TIGL_INDEX_ERROR if wingIndex or segmentIndex are not valid
  • TIGL_NULL_POINTER if sectionIndexPtr or elementIndexPtr are a null pointer
  • TIGL_ERROR if some other error occurred
TIGL_COMMON_EXPORT TiglReturnCode tiglWingGetLowerPoint ( TiglCPACSConfigurationHandle  cpacsHandle,
int  wingIndex,
int  segmentIndex,
double  eta,
double  xsi,
double *  pointXPtr,
double *  pointYPtr,
double *  pointZPtr 
)

Returns a point on the lower wing surface for a a given wing and segment index.

Returns a point on the lower wing surface in dependence of parameters eta and xsi, which range from 0.0 to 1.0. For eta = 0.0, xsi = 0.0 the point is equal to the leading edge on the inner section of the given segment. For eta = 1.0, xsi = 1.0 the point is equal to the trailing edge on the outer section of the given segment. The point is returned in absolute world coordinates.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]wingIndexThe index of the wing, starting at 1
[in]segmentIndexThe index of the segment of the wing, starting at 1
[in]etaeta in the range 0.0 <= eta <= 1.0
[in]xsixsi in the range 0.0 <= xsi <= 1.0
[out]pointXPtrPointer to the x-coordinate of the point in absolute world coordinates
[out]pointYPtrPointer to the y-coordinate of the point in absolute world coordinates
[out]pointZPtrPointer to the z-coordinate of the point in absolute world coordinates
Returns
  • TIGL_SUCCESS if a point was found
  • TIGL_NOT_FOUND if no intersection point was found or the cpacs handle is not valid
  • TIGL_INDEX_ERROR if wingIndex or segmentIndex are not valid
  • TIGL_NULL_POINTER if pointXPtr, pointYPtr or pointZPtr are null pointers
  • TIGL_ERROR if some other error occured
TIGL_COMMON_EXPORT TiglReturnCode tiglWingGetLowerPointAtDirection ( TiglCPACSConfigurationHandle  cpacsHandle,
int  wingIndex,
int  segmentIndex,
double  eta,
double  xsi,
double  dirx,
double  diry,
double  dirz,
double *  pointXPtr,
double *  pointYPtr,
double *  pointZPtr,
double *  errorDistance 
)

Returns a point on the lower wing surface for a a given wing and segment index. This function is different from tiglWingGetLowerPoint: First, a point on the wing chord surface is computed (defined by segment index and eta,xsi). Then, a line is constructed, which is defined by this point and a direction given by the user. The intersection of this line with the lower wing surface is finally returned. The point is returned in absolute world coordinates.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]wingIndexThe index of the wing, starting at 1
[in]segmentIndexThe index of the segment of the wing, starting at 1
[in]etaeta in the range 0.0 <= eta <= 1.0; eta = 0 for inner section , eta = 1 for outer section
[in]xsixsi in the range 0.0 <= xsi <= 1.0; xsi = 0 for Leading Edge, xsi = 1 for Trailing Edge
[in]dirxX-component of the direction vector.
[in]diryY-component of the direction vector.
[in]dirzZ-component of the direction vector.
[out]pointXPtrPointer to the x-coordinate of the point in absolute world coordinates
[out]pointYPtrPointer to the y-coordinate of the point in absolute world coordinates
[out]pointZPtrPointer to the z-coordinate of the point in absolute world coordinates
[out]errorDistanceIf the lower surface is missed by the line, the absolute distance between line and the nearest point on the surface is returned. The distance is zero in case of successful intersection. It's up to the user to decide, if the distance is too large and the result has to be treated as an error.
Returns
  • TIGL_SUCCESS if a point was found
  • TIGL_NOT_FOUND if no point was found or the cpacs handle is not valid
  • TIGL_INDEX_ERROR if wingIndex or segmentIndex are not valid
  • TIGL_NULL_POINTER if pointXPtr, pointYPtr or pointZPtr are null pointers
  • TIGL_ERROR if some other error occurred
TIGL_COMMON_EXPORT TiglReturnCode tiglWingGetOuterConnectedSegmentCount ( TiglCPACSConfigurationHandle  cpacsHandle,
int  wingIndex,
int  segmentIndex,
int *  segmentCountPtr 
)

Returns the count of wing segments connected to the outer section of a given segment.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]wingIndexThe index of a wing, starting at 1
[in]segmentIndexThe index of a segment, starting at 1
[out]segmentCountPtrPointer to the count of connected segments
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no configuration was found for the given handle
  • TIGL_INDEX_ERROR if wingIndex or segmentIndex are not valid
  • TIGL_NULL_POINTER if segmentCountPtr is a null pointer
  • TIGL_ERROR if some other error occurred
TIGL_COMMON_EXPORT TiglReturnCode tiglWingGetOuterConnectedSegmentIndex ( TiglCPACSConfigurationHandle  cpacsHandle,
int  wingIndex,
int  segmentIndex,
int  n,
int *  connectedIndexPtr 
)

Returns the index (number) of the n-th wing segment connected to the outer section of a given segment. n starts at 1.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]wingIndexThe index of a wing, starting at 1
[in]segmentIndexThe index of a segment, starting at 1
[in]nn-th segment searched, 1 <= n <= tiglWingGetOuterConnectedSegmentCount(...)
[out]connectedIndexPtrPointer to the segment index of the n-th connected segment
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no configuration was found for the given handle or no n-th connected segment was found
  • TIGL_INDEX_ERROR if wingIndex, segmentIndex or n are not valid
  • TIGL_NULL_POINTER if segmentIndexPtr is a null pointer
  • TIGL_ERROR if some other error occurred
TIGL_COMMON_EXPORT TiglReturnCode tiglWingGetOuterSectionAndElementIndex ( TiglCPACSConfigurationHandle  cpacsHandle,
int  wingIndex,
int  segmentIndex,
int *  sectionIndexPtr,
int *  elementIndexPtr 
)

Returns the section index and section element index of the outer side of a given wing segment.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]wingIndexThe index of a wing, starting at 1
[in]segmentIndexThe index of a segment, starting at 1
[out]sectionIndexPtrThe section index of the outer side
[out]elementIndexPtrThe section element index of the outer side
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no configuration was found for the given handle
  • TIGL_INDEX_ERROR if wingIndex or segmentIndex are not valid
  • TIGL_NULL_POINTER if sectionIndexPtr or elementIndexPtr are a null pointer
  • TIGL_ERROR if some other error occurred
TIGL_COMMON_EXPORT TiglReturnCode tiglWingGetOuterSectionAndElementUID ( TiglCPACSConfigurationHandle  cpacsHandle,
int  wingIndex,
int  segmentIndex,
char **  sectionUIDPtr,
char **  elementUIDPtr 
)

Returns the section UID and section element UID of the outer side of a given wing segment.

Important change: The memory necessary for the two UIDs must not be freed by the user anymore.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]wingIndexThe index of a wing, starting at 1
[in]segmentIndexThe index of a segment, starting at 1
[out]sectionUIDPtrThe section UID of the outer side
[out]elementUIDPtrThe section element UID of the outer side
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no configuration was found for the given handle
  • TIGL_INDEX_ERROR if wingIndex or segmentIndex are not valid
  • TIGL_NULL_POINTER if sectionIndexPtr or elementIndexPtr are a null pointer
  • TIGL_ERROR if some other error occurred
TIGL_COMMON_EXPORT TiglReturnCode tiglWingGetProfileName ( TiglCPACSConfigurationHandle  cpacsHandle,
int  wingIndex,
int  sectionIndex,
int  elementIndex,
char **  profileNamePtr 
)

Returns the name of a wing profile. The string returned must not be deleted by the caller via free(). It will be deleted when the CPACS configuration is closed.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]wingIndexThe index of a wing, starting at 1
[in]sectionIndexThe index of a section, starting at 1
[in]elementIndexThe index of an element on the section
[out]profileNamePtrThe name of the wing profile

Usage example:

   TiglReturnCode returnCode;
   char* namePtr = 0;
   returnCode = tiglWingGetProfileName(cpacsHandle, wing, section, element, &namePtr);
   printf("Profile name is %s\n", namePtr);
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no configuration was found for the given handle
  • TIGL_INDEX_ERROR if wingIndex, sectionIndex or elementIndex are not valid
  • TIGL_NULL_POINTER if profileNamePtr is a null pointer
  • TIGL_ERROR if some other error occurred
TIGL_COMMON_EXPORT TiglReturnCode tiglWingGetSectionCount ( TiglCPACSConfigurationHandle  cpacsHandle,
int  wingIndex,
int *  sectionCount 
)

Returns the number of sections of a wing.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]wingIndexThe index of a wing, starting at 1
[out]sectionCountThe number of sections of the wing

Usage example:

   TiglReturnCode returnCode;
   int sectionCount = 0;
   returnCode = tiglWingGetSectionUID(cpacsHandle, wingIndex, &sectionCount);
   printf("The Number of sections of wing %d is %d\n", wingIndex, sectionCount);
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no configuration was found for the given handle
  • TIGL_INDEX_ERROR if wingIndex is not valid
  • TIGL_NULL_POINTER if sectionCount is a null pointer
  • TIGL_ERROR if some other error occurred
TIGL_COMMON_EXPORT TiglReturnCode tiglWingGetSectionUID ( TiglCPACSConfigurationHandle  cpacsHandle,
int  wingIndex,
int  sectionIndex,
char **  uidNamePtr 
)

Returns the UID of a section of a wing. The string returned must not be deleted by the caller via free(). It will be deleted when the CPACS configuration is closed.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]wingIndexThe index of a wing, starting at 1
[in]sectionIndexThe index of a section, starting at 1
[out]uidNamePtrThe uid of the wing

Usage example:

   TiglReturnCode returnCode;
   char* uidPtr = 0;
   returnCode = tiglWingGetSectionUID(cpacsHandle, wing, sectionUID, &uidPtr);
   printf("The UID of the section of wing %d is %s\n", wing, uidPtr);
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no configuration was found for the given handle
  • TIGL_INDEX_ERROR if wingIndex, sectionIndex or elementIndex are not valid
  • TIGL_NULL_POINTER if profileNamePtr is a null pointer
  • TIGL_ERROR if some other error occurred
TIGL_COMMON_EXPORT TiglReturnCode tiglWingGetSegmentCount ( TiglCPACSConfigurationHandle  cpacsHandle,
int  wingIndex,
int *  segmentCountPtr 
)

Returns the number of segments for a wing in a CPACS configuration.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]wingIndexThe index of the wing, starting at 1
[out]segmentCountPtrPointer to the number of segments
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no configuration was found for the given handle
  • TIGL_INDEX_ERROR if wingIndex is not valid
  • TIGL_NULL_POINTER if segmentCountPtr is a null pointer
  • TIGL_ERROR if some other error occurred
TIGL_COMMON_EXPORT TiglReturnCode tiglWingGetSegmentEtaXsi ( TiglCPACSConfigurationHandle  cpacsHandle,
int  wingIndex,
double  pointX,
double  pointY,
double  pointZ,
int *  segmentIndex,
double *  eta,
double *  xsi,
int *  isOnTop 
)

Inverse function to tiglWingGetLowerPoint and tiglWingGetLowerPoint. Calculates to a point (x,y,z) in global coordinates the wing segment coordinates and the wing segment index.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]wingIndexThe index of the wing, starting at 1
[in]pointXX-Coordinate of the global point
[in]pointYY-Coordinate of the global point
[in]pointZZ-Coordinate of the global point
[out]segmentIndexThe index of the segment of the wing, starting at 1
[out]etaEta value in segment coordinates
[out]xsiXsi value in segment coordinates
[out]isOnTopisOnTop is 1, if the point lies on the upper wing face, else 0.
Returns
  • TIGL_SUCCESS if a solution was found
  • TIGL_NOT_FOUND if the point does not lie on the wing
  • TIGL_INDEX_ERROR if wingIndex is not valid
  • TIGL_NULL_POINTER if eta, xsi or isOnTop are null pointers
  • TIGL_ERROR if some other error occurred
TIGL_COMMON_EXPORT TiglReturnCode tiglWingGetSegmentIndex ( TiglCPACSConfigurationHandle  cpacsHandle,
const char *  segmentUID,
int *  segmentIndexPtr,
int *  wingIndexPtr 
)

Returns the Index of a segment of a wing.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]segmentUIDThe uid of the wing
[out]segmentIndexPtrThe index of a segment, starting at 1
[out]wingIndexPtrThe index of a wing, starting at 1

Usage example:

   TiglReturnCode returnCode;
   int segmentIndex, wingIndex;
   returnCode = tiglWingGetSegmentIndex(cpacsHandle, segmentUID, &segmentIndex, &wingIndex);
   printf("The Index of the segment of wing %d is %d\n", wingIndex, segmentIndex);
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no configuration was found for the given handle
  • TIGL_INDEX_ERROR if wingIndex is not valid
  • TIGL_UID_ERROR if the segmentUID does not exist
  • TIGL_NULL_POINTER if segmentUID is a null pointer
  • TIGL_ERROR if some other error occurred
TIGL_COMMON_EXPORT TiglReturnCode tiglWingGetSegmentUID ( TiglCPACSConfigurationHandle  cpacsHandle,
int  wingIndex,
int  segmentIndex,
char **  uidNamePtr 
)

Returns the UID of a segment of a wing. The string returned must not be deleted by the caller via free(). It will be deleted when the CPACS configuration is closed.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]wingIndexThe index of a wing, starting at 1
[in]segmentIndexThe index of a segment, starting at 1
[out]uidNamePtrThe uid of the wing

Usage example:

   TiglReturnCode returnCode;
   char* uidPtr = 0;
   returnCode = tiglWingGetSegmentUID(cpacsHandle, wing, segmentID, &uidPtr);
   printf("The UID of the segment of wing %d is %s\n", wing, uidPtr);
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no configuration was found for the given handle
  • TIGL_INDEX_ERROR if wingIndex, sectionIndex or elementIndex are not valid
  • TIGL_NULL_POINTER if profileNamePtr is a null pointer
  • TIGL_ERROR if some other error occurred
TIGL_COMMON_EXPORT TiglReturnCode tiglWingGetSymmetry ( TiglCPACSConfigurationHandle  cpacsHandle,
int  wingIndex,
TiglSymmetryAxis symmetryAxisPtr 
)

Returns the Symmetry Enum if the wing has symmetry-axis.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]wingIndexIndex of the Wing to export
[out]symmetryAxisPtrReturning TiglSymmetryAxis enum pointer
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no configuration was found for the given handle
  • TIGL_INDEX_ERROR if wingIndex is less or equal zero
  • TIGL_ERROR if some other error occurred
TIGL_COMMON_EXPORT TiglReturnCode tiglWingGetUID ( TiglCPACSConfigurationHandle  cpacsHandle,
int  wingIndex,
char **  uidNamePtr 
)

Returns the UID of a wing. The string returned must not be deleted by the caller via free(). It will be deleted when the CPACS configuration is closed.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]wingIndexThe index of a wing, starting at 1
[out]uidNamePtrThe uid of the wing

Usage example:

   TiglReturnCode returnCode;
   char* uidPtr = 0;
   returnCode = tiglWingGetUID(cpacsHandle, wing, &uidPtr);
   printf("The UID of the wing is %s\n", uidPtr);
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no configuration was found for the given handle
  • TIGL_INDEX_ERROR if wingIndex, sectionIndex or elementIndex are not valid
  • TIGL_NULL_POINTER if profileNamePtr is a null pointer
  • TIGL_ERROR if some other error occurred
TIGL_COMMON_EXPORT TiglReturnCode tiglWingGetUpperPoint ( TiglCPACSConfigurationHandle  cpacsHandle,
int  wingIndex,
int  segmentIndex,
double  eta,
double  xsi,
double *  pointXPtr,
double *  pointYPtr,
double *  pointZPtr 
)

Returns a point on the upper wing surface for a a given wing and segment index.

Returns a point on the upper wing surface in dependence of parameters eta and xsi, which range from 0.0 to 1.0. For eta = 0.0, xsi = 0.0 the point is equal to the leading edge on the inner section of the given segment. For eta = 1.0, xsi = 1.0 the point is equal to the trailing edge on the outer section of the given segment. The point is returned in absolute world coordinates.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]wingIndexThe index of the wing, starting at 1
[in]segmentIndexThe index of the segment of the wing, starting at 1
[in]etaeta in the range 0.0 <= eta <= 1.0; eta = 0 for inner section , eta = 1 for outer section
[in]xsixsi in the range 0.0 <= xsi <= 1.0; xsi = 0 for Leading Edge, xsi = 1 for Trailing Edge
[out]pointXPtrPointer to the x-coordinate of the point in absolute world coordinates
[out]pointYPtrPointer to the y-coordinate of the point in absolute world coordinates
[out]pointZPtrPointer to the z-coordinate of the point in absolute world coordinates
Returns
  • TIGL_SUCCESS if a point was found
  • TIGL_NOT_FOUND if no point was found or the cpacs handle is not valid
  • TIGL_INDEX_ERROR if wingIndex or segmentIndex are not valid
  • TIGL_NULL_POINTER if pointXPtr, pointYPtr or pointZPtr are null pointers
  • TIGL_ERROR if some other error occurred
TIGL_COMMON_EXPORT TiglReturnCode tiglWingGetUpperPointAtDirection ( TiglCPACSConfigurationHandle  cpacsHandle,
int  wingIndex,
int  segmentIndex,
double  eta,
double  xsi,
double  dirx,
double  diry,
double  dirz,
double *  pointXPtr,
double *  pointYPtr,
double *  pointZPtr,
double *  errorDistance 
)

Returns a point on the upper wing surface for a a given wing and segment index. This function is different from tiglWingGetUpperPoint: First, a point on the wing chord surface is computed (defined by segment index and eta,xsi). Then, a line is constructed, which is defined by this point and a direction given by the user. The intersection of this line with the upper wing surface is finally returned. The point is returned in absolute world coordinates.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]wingIndexThe index of the wing, starting at 1
[in]segmentIndexThe index of the segment of the wing, starting at 1
[in]etaeta in the range 0.0 <= eta <= 1.0; eta = 0 for inner section , eta = 1 for outer section
[in]xsixsi in the range 0.0 <= xsi <= 1.0; xsi = 0 for Leading Edge, xsi = 1 for Trailing Edge
[in]dirxX-component of the direction vector.
[in]diryY-component of the direction vector.
[in]dirzZ-component of the direction vector.
[out]pointXPtrPointer to the x-coordinate of the point in absolute world coordinates
[out]pointYPtrPointer to the y-coordinate of the point in absolute world coordinates
[out]pointZPtrPointer to the z-coordinate of the point in absolute world coordinates
[out]errorDistanceIf the upper surface is missed by the line, the absolute distance between line and the nearest point on the surface is returned. The distance is zero in case of successful intersection. It's up to the user to decide, if the distance is too large and the result has to be treated as an error.
Returns
  • TIGL_SUCCESS if a point was found
  • TIGL_NOT_FOUND if no intersection point was found or the cpacs handle is not valid
  • TIGL_MATH_ERROR if the given direction is a null vector (which has zero length)
  • TIGL_INDEX_ERROR if wingIndex or segmentIndex are not valid
  • TIGL_NULL_POINTER if pointXPtr, pointYPtr or pointZPtr are null pointers
  • TIGL_ERROR if some other error occurred
TIGL_COMMON_EXPORT TiglReturnCode tiglWingSegmentPointGetComponentSegmentEtaXsi ( TiglCPACSConfigurationHandle  cpacsHandle,
const char *  segmentUID,
const char *  componentSegmentUID,
double  segmentEta,
double  segmentXsi,
double *  eta,
double *  xsi 
)

Returns eta, xsi coordinates of a componentSegment given segmentEta and segmentXsi on a wing segment.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]segmentUIDUID of the wing segment to search for
[in]componentSegmentUIDUID of the associated componentSegment
[in]segmentEta,segmentXsiEta and Xsi coordinates of the point on the wing segment
[out]etaEta of the point on the corresponding component segment.
[out]xsiXsi of the point on the corresponding component segment.
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no configuration was found for the given handle
  • TIGL_UID_ERROR if the segment or the component segment does not exist
  • TIGL_ERROR if some other error occurred

Generated Tue Sep 24 2019 15:24:16, by Martin Siggel DLR