3.4.0
Functions for wing calculations

Functions

TiglReturnCode tiglControlSurfaceGetControlParameter (TiglCPACSConfigurationHandle cpacsHandle, const char *controlSurfaceUID, double *controlParameter)
 Returns the current value for the control parameter of a control device. More...
 
TiglReturnCode tiglControlSurfaceGetDeflection (TiglCPACSConfigurationHandle cpacsHandle, const char *controlSurfaceUID, double *deflection)
 This function is deprecated. It has been renamed to tiglControlSurfaceGetControlParameter. More...
 
TiglReturnCode tiglControlSurfaceGetMaximumControlParameter (TiglCPACSConfigurationHandle cpacsHandle, const char *controlSurfaceUID, double *maxParameter)
 Returns the maximum value for the control parameter of a control device. More...
 
TiglReturnCode tiglControlSurfaceGetMaximumDeflection (TiglCPACSConfigurationHandle cpacsHandle, const char *controlSurfaceUID, double *maxDeflection)
 This function is deprecated. It has been renamed to tiglControlSurfaceGetMaximumControlParameter. More...
 
TiglReturnCode tiglControlSurfaceGetMinimumControlParameter (TiglCPACSConfigurationHandle cpacsHandle, const char *controlSurfaceUID, double *minParameter)
 Returns the minimum value for the control parameter of a control device. More...
 
TiglReturnCode tiglControlSurfaceGetMinimumDeflection (TiglCPACSConfigurationHandle cpacsHandle, const char *controlSurfaceUID, double *minDeflection)
 This function is deprecated. It has been renamed to tiglControlSurfaceGetMinimumControlParameter. More...
 
TiglReturnCode tiglControlSurfaceSetControlParameter (TiglCPACSConfigurationHandle cpacsHandle, const char *controlSurfaceUID, double controlParameter)
 Sets the current value for the control parameter of a control device. More...
 
TiglReturnCode tiglControlSurfaceSetDeflection (TiglCPACSConfigurationHandle cpacsHandle, const char *controlSurfaceUID, double deflection)
 This function is deprecated. It has been renamed to tiglControlSurfaceSetControlParameter. More...
 
TiglReturnCode tiglGetControlSurfaceCount (TiglCPACSConfigurationHandle cpacsHandle, const char *componentSegmentUID, int *numControlSurfaces)
 Returns the number of control surfaces belonging to a component segment. More...
 
TiglReturnCode tiglGetControlSurfaceType (TiglCPACSConfigurationHandle cpacsHandle, const char *controlSurfaceUID, TiglControlSurfaceType *controlSurfaceType)
 Returns the type of a control surface given its UID. More...
 
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...
 
TiglReturnCode tiglGetWingCount (TiglCPACSConfigurationHandle cpacsHandle, int *wingCountPtr)
 Returns the number of wings in a CPACS configuration. More...
 
TiglReturnCode tiglWingComponentSegmentComputeEtaIntersection (TiglCPACSConfigurationHandle cpacsHandle, const char *componentSegmentUID, double csEta1, double csXsi1, double csEta2, double csXsi2, double eta, double *xsi, TiglBoolean *hasWarning)
 This function is deprecated. Use the generalized function tiglWingInterpolateXsi. More...
 
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...
 
TiglReturnCode tiglWingComponentSegmentGetNumberOfSegments (TiglCPACSConfigurationHandle cpacsHandle, const char *componentSegmentUID, int *nsegments)
 Returns the number of segments belonging to a component segment. More...
 
TiglReturnCode tiglWingComponentSegmentGetPoint (TiglCPACSConfigurationHandle cpacsHandle, const char *componentSegmentUID, double eta, double xsi, double *x, double *y, double *z)
 Returns x,y,z coordinates for a given eta and xsi on a componentSegment. More...
 
TiglReturnCode tiglWingComponentSegmentGetSegmentIntersection (TiglCPACSConfigurationHandle cpacsHandle, const char *componentSegmentUID, const char *segmentUID, double csEta1, double csXsi1, double csEta2, double csXsi2, double segmentEta, double *segmentXsi, TiglBoolean *hasWarning)
 This function is deprecated. Use the generalized function tiglWingInterpolateXsi. More...
 
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...
 
TiglReturnCode tiglWingComponentSegmentPointGetEtaXsi (TiglCPACSConfigurationHandle cpacsHandle, const char *componentSegmentUID, double pX, double pY, double pZ, double *eta, double *xsi, double *errorDistance)
 Projects a points onto the chord face of the wing component segment and returns the eta/xsi coordinates of the point of projection. More...
 
TiglReturnCode tiglWingComponentSegmentPointGetSegmentEtaXsi (TiglCPACSConfigurationHandle cpacsHandle, const char *componentSegmentUID, double eta, double xsi, char **wingUID, char **segmentUID, double *segmentEta, double *segmentXsi)
 Returns eta, xsi, segmentUID and wingUID for a given eta and xsi on a componentSegment. More...
 
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...
 
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...
 
TiglReturnCode tiglWingGetComponentSegmentCount (TiglCPACSConfigurationHandle cpacsHandle, int wingIndex, int *compSegmentCountPtr)
 Returns the number of component segments for a wing in a CPACS configuration. More...
 
TiglReturnCode tiglWingGetComponentSegmentIndex (TiglCPACSConfigurationHandle cpacsHandle, int wingIndex, const char *compSegmentUID, int *segmentIndexPtr)
 Returns the Index of a component segment of a wing. More...
 
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...
 
TiglReturnCode tiglWingGetIndex (TiglCPACSConfigurationHandle cpacsHandle, const char *wingUID, int *wingIndexPtr)
 Returns the Index of a wing. More...
 
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...
 
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...
 
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...
 
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...
 
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...
 
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...
 
TiglReturnCode tiglWingGetMAC (TiglCPACSConfigurationHandle cpacsHandle, const char *wingUID, double *mac_chord, double *mac_x, double *mac_y, double *mac_z)
 This function calculates location of the quarter of mean aerodynamic chord, and gives the chord length as well. More...
 
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...
 
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...
 
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...
 
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...
 
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...
 
TiglReturnCode tiglWingGetSectionCount (TiglCPACSConfigurationHandle cpacsHandle, int wingIndex, int *sectionCount)
 Returns the number of sections of a wing. More...
 
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...
 
TiglReturnCode tiglWingGetSegmentCount (TiglCPACSConfigurationHandle cpacsHandle, int wingIndex, int *segmentCountPtr)
 Returns the number of segments for a wing in a CPACS configuration. More...
 
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...
 
TiglReturnCode tiglWingGetSegmentIndex (TiglCPACSConfigurationHandle cpacsHandle, const char *segmentUID, int *segmentIndexPtr, int *wingIndexPtr)
 Returns the Index of a segment of a wing. More...
 
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...
 
TiglReturnCode tiglWingGetSpan (TiglCPACSConfigurationHandle cpacsHandle, const char *wingUID, double *pSpan)
 Returns the span of a wing. More...
 
TiglReturnCode tiglWingGetSymmetry (TiglCPACSConfigurationHandle cpacsHandle, int wingIndex, TiglSymmetryAxis *symmetryAxisPtr)
 Returns the Symmetry Enum if the wing has symmetry-axis. More...
 
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...
 
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...
 
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...
 
TiglReturnCode tiglWingInterpolateXsi (TiglCPACSConfigurationHandle cpacsHandle, const char *firstUID, double firstEta, double firstXsi, const char *secondUID, double secondEta, double secondXsi, const char *intersectionUID, double intersectionEta, double *intersectionXsi, TiglBoolean *hasWarning)
 Given a straight line in space defined by a pair of segment / component segment (eta,xsi) coordinates, the function computes the intersection of the line with an iso-eta line of a segment or component segment. More...
 
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...
 
TiglReturnCode tiglWingSetGetPointBehavior (TiglCPACSConfigurationHandle cpacsHandle, TiglGetPointBehavior behavior)
 Sets the behavior of the tiglWingGetUpperPoint and tiglWingGetLowerPoint functions. More...
 

Detailed Description

Function to handle wing geometry's with TIGL.

Function Documentation

◆ tiglControlSurfaceGetControlParameter()

TiglReturnCode tiglControlSurfaceGetControlParameter ( TiglCPACSConfigurationHandle  cpacsHandle,
const char *  controlSurfaceUID,
double *  controlParameter 
)

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

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]controlSurfaceUIDUID of the control surface
[out]controlParameterValue for the controlParameter
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 controlParameter is a NULL pointer
  • TIGL_ERROR if some other error occurred

◆ tiglControlSurfaceGetDeflection()

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

This function is deprecated. It has been renamed to tiglControlSurfaceGetControlParameter.

Deprecated:
since 3.1

◆ tiglControlSurfaceGetMaximumControlParameter()

TiglReturnCode tiglControlSurfaceGetMaximumControlParameter ( TiglCPACSConfigurationHandle  cpacsHandle,
const char *  controlSurfaceUID,
double *  maxParameter 
)

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

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]controlSurfaceUIDUID of the control surface
[out]maxParameterMaximum value for the control parameter
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 maxParameter is a NULL pointer
  • TIGL_ERROR if some other error occurred

◆ tiglControlSurfaceGetMaximumDeflection()

TiglReturnCode tiglControlSurfaceGetMaximumDeflection ( TiglCPACSConfigurationHandle  cpacsHandle,
const char *  controlSurfaceUID,
double *  maxDeflection 
)

This function is deprecated. It has been renamed to tiglControlSurfaceGetMaximumControlParameter.

Deprecated:
since 3.1

◆ tiglControlSurfaceGetMinimumControlParameter()

TiglReturnCode tiglControlSurfaceGetMinimumControlParameter ( TiglCPACSConfigurationHandle  cpacsHandle,
const char *  controlSurfaceUID,
double *  minParameter 
)

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

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]controlSurfaceUIDUID of the control surface
[out]minParameterMinimum value for the control parameter
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 minParameter is a NULL pointer
  • TIGL_ERROR if some other error occurred

◆ tiglControlSurfaceGetMinimumDeflection()

TiglReturnCode tiglControlSurfaceGetMinimumDeflection ( TiglCPACSConfigurationHandle  cpacsHandle,
const char *  controlSurfaceUID,
double *  minDeflection 
)

This function is deprecated. It has been renamed to tiglControlSurfaceGetMinimumControlParameter.

Deprecated:
since 3.1

◆ tiglControlSurfaceSetControlParameter()

TiglReturnCode tiglControlSurfaceSetControlParameter ( TiglCPACSConfigurationHandle  cpacsHandle,
const char *  controlSurfaceUID,
double  controlParameter 
)

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

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]controlSurfaceUIDUID of the control surface
[out]controlParameterValue for the control parameter
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

◆ tiglControlSurfaceSetDeflection()

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

This function is deprecated. It has been renamed to tiglControlSurfaceSetControlParameter.

Deprecated:
since 3.1

◆ tiglGetControlSurfaceCount()

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

◆ tiglGetControlSurfaceType()

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

◆ tiglGetControlSurfaceUID()

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

◆ tiglGetWingCount()

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

◆ tiglWingComponentSegmentComputeEtaIntersection()

TiglReturnCode tiglWingComponentSegmentComputeEtaIntersection ( TiglCPACSConfigurationHandle  cpacsHandle,
const char *  componentSegmentUID,
double  csEta1,
double  csXsi1,
double  csEta2,
double  csXsi2,
double  eta,
double *  xsi,
TiglBoolean hasWarning 
)

This function is deprecated. Use the generalized function tiglWingInterpolateXsi.

Deprecated:
since 3.2

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

◆ tiglWingComponentSegmentFindSegment()

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

◆ tiglWingComponentSegmentGetNumberOfSegments()

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

◆ tiglWingComponentSegmentGetPoint()

TiglReturnCode tiglWingComponentSegmentGetPoint ( TiglCPACSConfigurationHandle  cpacsHandle,
const char *  componentSegmentUID,
double  eta,
double  xsi,
double *  x,
double *  y,
double *  z 
)

Returns x,y,z coordinates 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

◆ tiglWingComponentSegmentGetSegmentIntersection()

TiglReturnCode tiglWingComponentSegmentGetSegmentIntersection ( TiglCPACSConfigurationHandle  cpacsHandle,
const char *  componentSegmentUID,
const char *  segmentUID,
double  csEta1,
double  csXsi1,
double  csEta2,
double  csXsi2,
double  segmentEta,
double *  segmentXsi,
TiglBoolean hasWarning 
)

This function is deprecated. Use the generalized function tiglWingInterpolateXsi.

Deprecated:
since 3.2

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

◆ tiglWingComponentSegmentGetSegmentUID()

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

◆ tiglWingComponentSegmentPointGetEtaXsi()

TiglReturnCode tiglWingComponentSegmentPointGetEtaXsi ( TiglCPACSConfigurationHandle  cpacsHandle,
const char *  componentSegmentUID,
double  pX,
double  pY,
double  pZ,
double *  eta,
double *  xsi,
double *  errorDistance 
)

Projects a points onto the chord face of the wing component segment and returns the eta/xsi coordinates of the point of projection.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]componentSegmentUIDUID of the componentSegment to search for
[in]pXX coordinate of the point to project
[in]pYY coordinate of the point to project
[in]pZZ coordinate of the point to project
[out]etaEta coordinate of the projected point
[out]xsiXsi coordinate of the projected point
[out]errorDistanceDistance between the point and the projected point on the component segment. If the point already lies on the component segment's chord face, the errorDistance should be zero!
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

◆ tiglWingComponentSegmentPointGetSegmentEtaXsi()

TiglReturnCode tiglWingComponentSegmentPointGetSegmentEtaXsi ( TiglCPACSConfigurationHandle  cpacsHandle,
const char *  componentSegmentUID,
double  eta,
double  xsi,
char **  wingUID,
char **  segmentUID,
double *  segmentEta,
double *  segmentXsi 
)

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.
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

◆ tiglWingGetChordNormal()

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 occurred

◆ tiglWingGetChordPoint()

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 occurred

◆ tiglWingGetComponentSegmentCount()

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

◆ tiglWingGetComponentSegmentIndex()

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

◆ tiglWingGetComponentSegmentUID()

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

◆ tiglWingGetIndex()

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

◆ tiglWingGetInnerConnectedSegmentCount()

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

◆ tiglWingGetInnerConnectedSegmentIndex()

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 occurred

◆ tiglWingGetInnerSectionAndElementIndex()

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

◆ tiglWingGetInnerSectionAndElementUID()

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

◆ tiglWingGetLowerPoint()

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.

The behavior of this function can be modified using tiglWingSetGetPointBehavior. The options are asParametersOnSurface or onLinearLoft. For the first, the inputs are interpreted as normalized parameters on the surface and the point corresponding to these parameters is returned (default). For the second, the inputs are interpreted as eta-xsi coordinates on the chordface spanned by the leading edge and trailing edge points of the inner and outer elements.

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 occurred

◆ tiglWingGetLowerPointAtDirection()

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

◆ tiglWingGetMAC()

TiglReturnCode tiglWingGetMAC ( TiglCPACSConfigurationHandle  cpacsHandle,
const char *  wingUID,
double *  mac_chord,
double *  mac_x,
double *  mac_y,
double *  mac_z 
)

This function calculates location of the quarter of mean aerodynamic chord, and gives the chord length as well.

It uses the classical method that can be applied to trapozaidal wings. This method is used for each segment. The values are found by taking into account of sweep and dihedral. But the effect of insidance angle is neglected. These values should coincide with the values found with tornado tool.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]wingUIDUID of the Wing
[out]mac_chordMean areadynamic chord length
[out]mac_x,mac_y,mac_z- Position of the MAC
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NULL_POINTER if wingUID, mac_chord, mac_x, mac_y or mac_z are null pointers
  • TIGL_ERROR In case of an unknown error

◆ tiglWingGetOuterConnectedSegmentCount()

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

◆ tiglWingGetOuterConnectedSegmentIndex()

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

◆ tiglWingGetOuterSectionAndElementIndex()

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

◆ tiglWingGetOuterSectionAndElementUID()

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

◆ tiglWingGetProfileName()

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

◆ tiglWingGetSectionCount()

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

◆ tiglWingGetSectionUID()

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

◆ tiglWingGetSegmentCount()

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

◆ tiglWingGetSegmentEtaXsi()

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

◆ tiglWingGetSegmentIndex()

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

◆ tiglWingGetSegmentUID()

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

◆ tiglWingGetSpan()

TiglReturnCode tiglWingGetSpan ( TiglCPACSConfigurationHandle  cpacsHandle,
const char *  wingUID,
double *  pSpan 
)

Returns the span of a wing.

The calculation of the wing span is realized as follows:

  • If the wing is mirrored at a symmetry plane (like the main wing), the wing body and its mirrored counterpart are computed and are put into a bounding box. The length of the box in a specific space dimension is returned as the wing span depending on the symmetry plane (y direction for x-z planes, z direction for x-y planes, x direction for y-z symmetry planes).
  • If no symmetry plane is defined (e.g. for the fins), the largest dimension of the bounding box around the wing is returned.
Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]wingUIDUID of the Wing
[out]pSpanWing span
Returns
Error code

◆ tiglWingGetSymmetry()

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

◆ tiglWingGetUID()

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

◆ tiglWingGetUpperPoint()

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.

The behavior of this function can be modified using tiglWingSetGetPointBehavior. The options are asParametersOnSurface or onLinearLoft. For the first, the inputs are interpreted as normalized parameters on the surface and the point corresponding to these parameters is returned (default). For the second, the inputs are interpreted as eta-xsi coordinates on the chordface spanned by the leading edge and trailing edge points of the inner and outer elements.

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

◆ tiglWingGetUpperPointAtDirection()

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

◆ tiglWingInterpolateXsi()

TiglReturnCode tiglWingInterpolateXsi ( TiglCPACSConfigurationHandle  cpacsHandle,
const char *  firstUID,
double  firstEta,
double  firstXsi,
const char *  secondUID,
double  secondEta,
double  secondXsi,
const char *  intersectionUID,
double  intersectionEta,
double *  intersectionXsi,
TiglBoolean hasWarning 
)

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

The line is defined by its inner and outer point, both given in segment or component segment coordinates. Typically, these might be spar positions or leading edge coordinates of flaps. The function returns the xsi coordinate (depth coordinate) of the intersection point in the coordinate system defined by the uid. Hence, this coordinate is given in either the segment or component segment coordinate system. See image below for details.

InterpolateXsi.png
Computation of the interpolation point.
Parameters
[in]cpacsHandle
[in]firstUID,firstEta,firstXsiStarting point of the intersection line (on segment or component segment)
[in]secondUID,secondEta,secondXsiEnding point of the intersection line (on segment or component segment)
[in]intersectionUIDUID of the segment or componentSegment that relates to eta
[in]intersectionEtaEta coordinate of the iso-eta segment or component segment intersection line
[out]intersectionXsiXsi coordinate of the intersection point on the referred segment or 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

◆ tiglWingSegmentPointGetComponentSegmentEtaXsi()

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

◆ tiglWingSetGetPointBehavior()

TiglReturnCode tiglWingSetGetPointBehavior ( TiglCPACSConfigurationHandle  cpacsHandle,
TiglGetPointBehavior  behavior 
)

Sets the behavior of the tiglWingGetUpperPoint and tiglWingGetLowerPoint functions.

This function sets the behavior of the tiglWingGetUpperPoint and tiglWingGetLowerPoint functions. The options are asParameterOnSurface or onLinearLoft. For the first, the inputs are interpreted as normalized parameters on the surface and the point corresponding to these parameters is returned. For the second, the inputs are interpreted as eta-xsi coordinates on the chordface spanned by the leading edge and trailing edge points of the inner and outer elements.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]behaviorenum describing the desired behavior of the function. Possible values are asParameterOnSurface and onLinearLoft.
Returns
  • TIGL_SUCCESS if a point was found
  • TIGL_INDEX_ERROR if fuselageIndex or segmentIndex are not valid
  • TIGL_NULL_POINTER if pointXPtr, pointYPtr or pointZPtr are null pointers