3.0.0
Functions for fuselage calculations

Functions

TiglReturnCode tiglFuselageGetCenterLineLength (TiglCPACSConfigurationHandle cpacsHandle, const char *fuselageUID, double *length)
 Returns the length of center line of the given fuselage with all its segments which connects all the center points of the cross sections of the fuselage. More...
 
TiglReturnCode tiglFuselageGetCircumference (TiglCPACSConfigurationHandle cpacsHandle, int fuselageIndex, int segmentIndex, double eta, double *circumferencePtr)
 Returns the circumference of a fuselage surface for a given fuselage and segment index and an eta. More...
 
TiglReturnCode tiglFuselageGetCrossSectionArea (TiglCPACSConfigurationHandle cpacsHandle, const char *fuselageSegmentUID, double eta, double *area)
 Returns the value of the area of a cross section of a fuselage. More...
 
TiglReturnCode tiglFuselageGetEndConnectedSegmentCount (TiglCPACSConfigurationHandle cpacsHandle, int fuselageIndex, int segmentIndex, int *segmentCountPtr)
 Returns the count of segments connected to the end section of a given fuselage segment. More...
 
TiglReturnCode tiglFuselageGetEndConnectedSegmentIndex (TiglCPACSConfigurationHandle cpacsHandle, int fuselageIndex, int segmentIndex, int n, int *connectedIndexPtr)
 Returns the index (number) of the n-th segment connected to the end section of a given fuselage segment. n starts at 1. More...
 
TiglReturnCode tiglFuselageGetEndSectionAndElementIndex (TiglCPACSConfigurationHandle cpacsHandle, int fuselageIndex, int segmentIndex, int *sectionIndexPtr, int *elementIndexPtr)
 Returns the section index and section element index of the end side of a given fuselage segment. More...
 
TiglReturnCode tiglFuselageGetEndSectionAndElementUID (TiglCPACSConfigurationHandle cpacsHandle, int fuselageIndex, int segmentIndex, char **sectionUIDPtr, char **elementUIDPtr)
 Returns the section UID and section element UID of the end side of a given fuselage segment. More...
 
TiglReturnCode tiglFuselageGetIndex (TiglCPACSConfigurationHandle cpacsHandle, const char *fuselageUID, int *fuselageIndexPtr)
 Returns the index of a fuselage. More...
 
TiglReturnCode tiglFuselageGetMinumumDistanceToGround (TiglCPACSConfigurationHandle cpacsHandle, char *fuselageUID, double axisPntX, double axisPntY, double axisPntZ, double axisDirX, double axisDirY, double axisDirZ, double angle, double *pointXPtr, double *pointYPtr, double *pointZPtr)
 Returns the point where the distance between the selected fuselage and the ground is at minimum. The Fuselage could be turned with a given angle at at given axis, specified by a point and a direction. More...
 
TiglReturnCode tiglFuselageGetNumPointsOnXPlane (TiglCPACSConfigurationHandle cpacsHandle, int fuselageIndex, int segmentIndex, double eta, double xpos, int *numPointsPtr)
 Returns the number of points on a fuselage surface for a given fuselage and a give x-position. More...
 
TiglReturnCode tiglFuselageGetNumPointsOnYPlane (TiglCPACSConfigurationHandle cpacsHandle, int fuselageIndex, int segmentIndex, double eta, double ypos, int *numPointsPtr)
 Returns the number of points on a fuselage surface for a given fuselage and a give y-position. More...
 
TiglReturnCode tiglFuselageGetPoint (TiglCPACSConfigurationHandle cpacsHandle, int fuselageIndex, int segmentIndex, double eta, double zeta, double *pointXPtr, double *pointYPtr, double *pointZPtr)
 Returns a point on a fuselage surface for a given fuselage and segment index. More...
 
TiglReturnCode tiglFuselageGetPointAngle (TiglCPACSConfigurationHandle cpacsHandle, int fuselageIndex, int segmentIndex, double eta, double alpha, double *pointXPtr, double *pointYPtr, double *pointZPtr)
 Returns a point on a fuselage surface for a given fuselage and segment index and an angle alpha (degree). More...
 
TiglReturnCode tiglFuselageGetPointAngleTranslated (TiglCPACSConfigurationHandle cpacsHandle, int fuselageIndex, int segmentIndex, double eta, double alpha, double y_cs, double z_cs, double *pointXPtr, double *pointYPtr, double *pointZPtr)
 Returns a point on a fuselage surface for a given fuselage and segment index and an angle alpha (degree). 0 degree of the angle alpha is meant to be "up" in the direction of the positive z-axis like specifies in cpacs. The origin of the line that will be rotated with the angle alpha could be translated via the parameters y_cs and z_cs. More...
 
TiglReturnCode tiglFuselageGetPointOnXPlane (TiglCPACSConfigurationHandle cpacsHandle, int fuselageIndex, int segmentIndex, double eta, double xpos, int pointIndex, double *pointXPtr, double *pointYPtr, double *pointZPtr)
 Returns a point on a fuselage surface for a given fuselage and segment index. More...
 
TiglReturnCode tiglFuselageGetPointOnYPlane (TiglCPACSConfigurationHandle cpacsHandle, int fuselageIndex, int segmentIndex, double eta, double ypos, int pointIndex, double *pointXPtr, double *pointYPtr, double *pointZPtr)
 Returns a point on a fuselage surface for a given fuselage and segment index. More...
 
TiglReturnCode tiglFuselageGetProfileName (TiglCPACSConfigurationHandle cpacsHandle, int fuselageIndex, int sectionIndex, int elementIndex, char **profileNamePtr)
 Returns the name of a fuselage 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 tiglFuselageGetSectionCenter (TiglCPACSConfigurationHandle cpacsHandle, const char *fuselageSegmentUID, double eta, double *pointX, double *pointY, double *pointZ)
 Returns the section center of a fuselage. More...
 
TiglReturnCode tiglFuselageGetSectionCount (TiglCPACSConfigurationHandle cpacsHandle, int fuselageIndex, int *sectionCount)
 Returns the number of sections of a fuselage. More...
 
TiglReturnCode tiglFuselageGetSectionUID (TiglCPACSConfigurationHandle cpacsHandle, int fuselageIndex, int sectionIndex, char **uidNamePtr)
 Returns the UID of a section of a fuselage. The string returned must not be deleted by the caller via free(). It will be deleted when the CPACS configuration is closed. More...
 
TiglReturnCode tiglFuselageGetSegmentCount (TiglCPACSConfigurationHandle cpacsHandle, int fuselageIndex, int *segmentCountPtr)
 Returns the number of segments for a fuselage in a CPACS configuration. More...
 
TiglReturnCode tiglFuselageGetSegmentIndex (TiglCPACSConfigurationHandle cpacsHandle, const char *segmentUID, int *segmentIndexPtr, int *fuselageIndexPtr)
 Returns the Index of a segment of a fuselage. More...
 
TiglReturnCode tiglFuselageGetSegmentUID (TiglCPACSConfigurationHandle cpacsHandle, int fuselageIndex, int segmentIndex, char **uidNamePtr)
 Returns the UID of a segment of a fuselage. The string returned must not be deleted by the caller via free(). It will be deleted when the CPACS configuration is closed. More...
 
TiglReturnCode tiglFuselageGetStartConnectedSegmentCount (TiglCPACSConfigurationHandle cpacsHandle, int fuselageIndex, int segmentIndex, int *segmentCountPtr)
 Returns the count of segments connected to the start section of a given fuselage segment. More...
 
TiglReturnCode tiglFuselageGetStartConnectedSegmentIndex (TiglCPACSConfigurationHandle cpacsHandle, int fuselageIndex, int segmentIndex, int n, int *connectedIndexPtr)
 Returns the index (number) of the n-th segment connected to the start section of a given fuselage segment. n starts at 1. More...
 
TiglReturnCode tiglFuselageGetStartSectionAndElementIndex (TiglCPACSConfigurationHandle cpacsHandle, int fuselageIndex, int segmentIndex, int *sectionIndexPtr, int *elementIndexPtr)
 Returns the section index and section element index of the start side of a given fuselage segment. More...
 
TiglReturnCode tiglFuselageGetStartSectionAndElementUID (TiglCPACSConfigurationHandle cpacsHandle, int fuselageIndex, int segmentIndex, char **sectionUIDPtr, char **elementUIDPtr)
 Returns the section UID and section element UID of the start side of a given fuselage segment. More...
 
TiglReturnCode tiglFuselageGetSymmetry (TiglCPACSConfigurationHandle cpacsHandle, int fuselageIndex, TiglSymmetryAxis *symmetryAxisPtr)
 Returns the Symmetry Enum if the fuselage has symmetry-axis. More...
 
TiglReturnCode tiglFuselageGetUID (TiglCPACSConfigurationHandle cpacsHandle, int fuselageIndex, char **uidNamePtr)
 Returns the UID of a fuselage. The string returned must not be deleted by the caller via free(). It will be deleted when the CPACS configuration is closed. More...
 
TiglReturnCode tiglFuselageSetGetPointBehavior (TiglCPACSConfigurationHandle cpacsHandle, TiglGetPointBehavior behavior)
 Sets the behavior of the tiglFuselageGetPoint function. More...
 
TiglReturnCode tiglGetFuselageCount (TiglCPACSConfigurationHandle cpacsHandle, int *fuselageCountPtr)
 Returns the number of fuselages in a CPACS configuration. More...
 

Detailed Description

Function to handle fuselage geometry's with TIGL.

Function Documentation

TiglReturnCode tiglFuselageGetCenterLineLength ( TiglCPACSConfigurationHandle  cpacsHandle,
const char *  fuselageUID,
double *  length 
)

Returns the length of center line of the given fuselage with all its segments which connects all the center points of the cross sections of the fuselage.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]fuselageUIDUID of the fuselage
[out]lengththe sum of the lengths of all the fuselage segments
Returns
  • TIGL_SUCCESS if the length was found
  • TIGL_NOT_FOUND if no configuration was found for the given handle
  • TIGL_UID_ERROR if UID is invalid or not a fuselage
  • TIGL_NULL_POINTER if length is a null pointer
  • TIGL_ERROR if some other error occurred
TiglReturnCode tiglFuselageGetCircumference ( TiglCPACSConfigurationHandle  cpacsHandle,
int  fuselageIndex,
int  segmentIndex,
double  eta,
double *  circumferencePtr 
)

Returns the circumference of a fuselage surface for a given fuselage and segment index and an eta.

Returns the circumference of a fuselage segment of a given fuselage in dependence of parameters eta with 0.0 <= eta <= 1.0. For eta = 0.0 the point lies on the start profile of the segment, for eta = 1.0 it lies on the end profile of the segment.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]fuselageIndexThe index of the fuselage, starting at 1
[in]segmentIndexThe index of the segment of the fuselage, starting at 1
[in]etaeta in the range 0.0 <= eta <= 1.0
[out]circumferencePtrThe Circumference of the fuselage at the given position
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 fuselageIndex or segmentIndex are not valid
  • TIGL_NULL_POINTER if pointXPtr, pointYPtr or pointZPtr are null pointers
  • TIGL_ERROR if some other error occurred
TiglReturnCode tiglFuselageGetCrossSectionArea ( TiglCPACSConfigurationHandle  cpacsHandle,
const char *  fuselageSegmentUID,
double  eta,
double *  area 
)

Returns the value of the area of a cross section of a fuselage.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]fuselageSegmentUIDUID of the segment
[in]etaParameter value from where on the given object the section is cut out, eta in the range 0.0 <= eta <= 1.0
[out]areathe area of the given cross section of a given fuselage
Returns
  • TIGL_SUCCESS if the area was found
  • TIGL_NOT_FOUND if no configuration was found for the given handle
  • TIGL_UID_ERROR if UID is invalid or not a fuselage segment
  • TIGL_NULL_POINTER if area is a null pointer
  • TIGL_MATH_ERROR if eta is out of range, i.e., not in [0, 1]
  • TIGL_ERROR if some other error occurred
TiglReturnCode tiglFuselageGetEndConnectedSegmentCount ( TiglCPACSConfigurationHandle  cpacsHandle,
int  fuselageIndex,
int  segmentIndex,
int *  segmentCountPtr 
)

Returns the count of segments connected to the end section of a given fuselage segment.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]fuselageIndexThe index of a fuselage, 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 fuselageIndex or segmentIndex are not valid
  • TIGL_NULL_POINTER if segmentCountPtr is a null pointer
  • TIGL_ERROR if some other error occurred
TiglReturnCode tiglFuselageGetEndConnectedSegmentIndex ( TiglCPACSConfigurationHandle  cpacsHandle,
int  fuselageIndex,
int  segmentIndex,
int  n,
int *  connectedIndexPtr 
)

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

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]fuselageIndexThe index of a fuselage, starting at 1
[in]segmentIndexThe index of a segment, starting at 1
[in]nn-th segment searched, 1 <= n <= tiglFuselageGetEndConnectedSegmentCount(...)
[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 fuselageIndex, segmentIndex or n are not valid
  • TIGL_NULL_POINTER if segmentIndexPtr is a null pointer
  • TIGL_ERROR if some other error occurred
TiglReturnCode tiglFuselageGetEndSectionAndElementIndex ( TiglCPACSConfigurationHandle  cpacsHandle,
int  fuselageIndex,
int  segmentIndex,
int *  sectionIndexPtr,
int *  elementIndexPtr 
)

Returns the section index and section element index of the end side of a given fuselage segment.

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

Returns the section UID and section element UID of the end side of a given fuselage segment.

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

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]fuselageIndexThe index of a fuselage, starting at 1
[in]segmentIndexThe index of a segment, starting at 1
[out]sectionUIDPtrThe section UID the end side
[out]elementUIDPtrThe section element UID of the end side
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no configuration was found for the given handle
  • TIGL_INDEX_ERROR if fuselageIndex or segmentIndex are not valid
  • TIGL_ERROR if some other error occurred
TiglReturnCode tiglFuselageGetIndex ( TiglCPACSConfigurationHandle  cpacsHandle,
const char *  fuselageUID,
int *  fuselageIndexPtr 
)

Returns the index of a fuselage.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]fuselageUIDThe uid of the fuselage
[out]fuselageIndexPtrThe index of a fuselage, starting at 1

Usage example:

   TiglReturnCode returnCode;
   int fuselageIndex;
   returnCode = tiglFuselageGetIndex(cpacsHandle, fuselageUID, &fuselageIndex);
   printf("The Index of the fuselage is %d\n", fuselageIndex);
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no configuration was found for the given handle
  • TIGL_UID_ERROR if fuselageUID does not exist
  • TIGL_NULL_POINTER if fuselageUID is a null pointer
  • TIGL_ERROR if some other error occurred
TiglReturnCode tiglFuselageGetMinumumDistanceToGround ( TiglCPACSConfigurationHandle  cpacsHandle,
char *  fuselageUID,
double  axisPntX,
double  axisPntY,
double  axisPntZ,
double  axisDirX,
double  axisDirY,
double  axisDirZ,
double  angle,
double *  pointXPtr,
double *  pointYPtr,
double *  pointZPtr 
)

Returns the point where the distance between the selected fuselage and the ground is at minimum. The Fuselage could be turned with a given angle at at given axis, specified by a point and a direction.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]fuselageUIDThe uid of the fuselage
[in]axisPntXX-coordinate of the point that specifies the axis of rotation
[in]axisPntYY-coordinate of the point that specifies the axis of rotation
[in]axisPntZZ-coordinate of the point that specifies the axis of rotation
[in]axisDirXX-coordinate of the direction that specifies the axis of rotation
[in]axisDirYY-coordinate of the direction that specifies the axis of rotation
[in]axisDirZZ-coordinate of the direction that specifies the axis of rotation
[in]angleThe angle (in Degree) by which the fuselage should be turned on the axis of rotation
[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 no error occurred
  • TIGL_NOT_FOUND if no configuration was found for the given handle
  • TIGL_INDEX_ERROR if fuselageUID is not valid
  • TIGL_NULL_POINTER if pointXPtr, pointYPtr or pointZPtr are null pointers
  • TIGL_ERROR if some other error occurred
TiglReturnCode tiglFuselageGetNumPointsOnXPlane ( TiglCPACSConfigurationHandle  cpacsHandle,
int  fuselageIndex,
int  segmentIndex,
double  eta,
double  xpos,
int *  numPointsPtr 
)

Returns the number of points on a fuselage surface for a given fuselage and a give x-position.

Returns the number of points on a fuselage segment of a given fuselage in dependence of parameters eta and at all x-positions with 0.0 <= eta <= 1.0. For eta = 0.0 the point lies on the start profile of the segment, for eta = 1.0 it lies on the end profile of the segment.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]fuselageIndexThe index of the fuselage, starting at 1
[in]segmentIndexThe index of the segment of the fuselage, starting at 1
[in]etaeta in the range 0.0 <= eta <= 1.0
[in]xposX position
[out]numPointsPtrPointer to a integer for the number of intersection points
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 fuselageIndex or segmentIndex are not valid
  • TIGL_NULL_POINTER if pointXPtr, pointYPtr or pointZPtr are null pointers
  • TIGL_ERROR if some other error occurred
TiglReturnCode tiglFuselageGetNumPointsOnYPlane ( TiglCPACSConfigurationHandle  cpacsHandle,
int  fuselageIndex,
int  segmentIndex,
double  eta,
double  ypos,
int *  numPointsPtr 
)

Returns the number of points on a fuselage surface for a given fuselage and a give y-position.

Returns the number of points on a fuselage segment of a given fuselage in dependence of parameters eta and at all y-positions with 0.0 <= eta <= 1.0. For eta = 0.0 the point lies on the start profile of the segment, for eta = 1.0 it lies on the end profile of the segment.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]fuselageIndexThe index of the fuselage, starting at 1
[in]segmentIndexThe index of the segment of the fuselage, starting at 1
[in]etaeta in the range 0.0 <= eta <= 1.0
[in]yposY position
[out]numPointsPtrPointer to a interger for the number of intersection points
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 fuselageIndex or segmentIndex are not valid
  • TIGL_NULL_POINTER if pointXPtr, pointYPtr or pointZPtr are null pointers
  • TIGL_ERROR if some other error occurred
TiglReturnCode tiglFuselageGetPoint ( TiglCPACSConfigurationHandle  cpacsHandle,
int  fuselageIndex,
int  segmentIndex,
double  eta,
double  zeta,
double *  pointXPtr,
double *  pointYPtr,
double *  pointZPtr 
)

Returns a point on a fuselage surface for a given fuselage and segment index.

Returns a point on a fuselage segment of a given fuselage in dependence of parameters eta and zeta with 0.0 <= eta <= 1.0 and 0.0 <= zeta <= 1.0. For eta = 0.0 the point lies on the start profile of the segment, for eta = 1.0 it lies on the end profile of the segment. For zeta = 0.0 the point is the identical to the start point of the profile wire, for zeta = 1.0 it is identical to the last profile point. The point is returned in absolute world coordinates.

The behavior of this function can be modified using tiglFuselageSetGetPointBehavior. 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 coordinates along the center line of the fuselage segment, xsi is interpreted as a relative circumference between 0 and 1, and the resulting point lies on the linear loft of the fuselage segment.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]fuselageIndexThe index of the fuselage, starting at 1
[in]segmentIndexThe index of the segment of the fuselage, starting at 1
[in]etaeta in the range 0.0 <= eta <= 1.0
[in]zetazeta in the range 0.0 <= zeta <= 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 point was found or the cpacs handle is not valid
  • TIGL_INDEX_ERROR if fuselageIndex or segmentIndex are not valid
  • TIGL_NULL_POINTER if pointXPtr, pointYPtr or pointZPtr are null pointers
  • TIGL_ERROR if some other error occurred
TiglReturnCode tiglFuselageGetPointAngle ( TiglCPACSConfigurationHandle  cpacsHandle,
int  fuselageIndex,
int  segmentIndex,
double  eta,
double  alpha,
double *  pointXPtr,
double *  pointYPtr,
double *  pointZPtr 
)

Returns a point on a fuselage surface for a given fuselage and segment index and an angle alpha (degree).

Returns a point on a fuselage segment of a given fuselage in dependence of parameters eta and at all y-positions with 0.0 <= eta <= 1.0. For eta = 0.0 the point lies on the start profile of the segment, for eta = 1.0 it lies on the end profile of the segment. The angle alpha is calculated in degrees. Alpha=0 degree is meant to be "up" in the direction of the positive z-axis like specifies in cpacs. It's orientation is the mathematical negative rotation direction around the X-axis, i.e. looking in flight direction, an angle of 45 degrees resembles a point on the top-left fuselage. The point is returned in absolute world coordinates.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]fuselageIndexThe index of the fuselage, starting at 1
[in]segmentIndexThe index of the segment of the fuselage, starting at 1
[in]etaEta in the range 0.0 <= eta <= 1.0
[in]alphaAngle alpha in degrees. No range restrictions.
[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 fuselageIndex or segmentIndex are not valid
  • TIGL_NULL_POINTER if pointXPtr, pointYPtr or pointZPtr are null pointers
  • TIGL_ERROR if some other error occurred, for example if there is no point at the given eta.
TiglReturnCode tiglFuselageGetPointAngleTranslated ( TiglCPACSConfigurationHandle  cpacsHandle,
int  fuselageIndex,
int  segmentIndex,
double  eta,
double  alpha,
double  y_cs,
double  z_cs,
double *  pointXPtr,
double *  pointYPtr,
double *  pointZPtr 
)

Returns a point on a fuselage surface for a given fuselage and segment index and an angle alpha (degree). 0 degree of the angle alpha is meant to be "up" in the direction of the positive z-axis like specifies in cpacs. The origin of the line that will be rotated with the angle alpha could be translated via the parameters y_cs and z_cs.

Returns a point on a fuselage segment of a given fuselage in dependence of parameters eta and at all y-positions with 0.0 <= eta <= 1.0. For eta = 0.0 the point lies on the start profile of the segment, for eta = 1.0 it lies on the end profile of the segment. The angle alpha is calculated in degrees. It's orientation is the mathematical negative rotation direction around the X-axis, i.e. looking in flight direction, an angle of 45 degrees resembles a point on the top-left fuselage. The parameters y_cs and z_cs must be in absolute world coordinates. The point is returned in absolute world coordinates.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]fuselageIndexThe index of the fuselage, starting at 1
[in]segmentIndexThe index of the segment of the fuselage, starting at 1
[in]etaeta in the range 0.0 <= eta <= 1.0
[in]alphaAngle alpha in degrees. No range restrictions.
[in]y_csShifts the origin of the angle alpha in y-direction.
[in]z_csShifts the origin of the angle alpha in z-direction.
[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 fuselageIndex or segmentIndex are not valid
  • TIGL_NULL_POINTER if pointXPtr, pointYPtr or pointZPtr are null pointers
  • TIGL_ERROR if some other error occurred, for example if there is no point at the given eta and the given shifting parameters y_cs and z_cs.
TiglReturnCode tiglFuselageGetPointOnXPlane ( TiglCPACSConfigurationHandle  cpacsHandle,
int  fuselageIndex,
int  segmentIndex,
double  eta,
double  xpos,
int  pointIndex,
double *  pointXPtr,
double *  pointYPtr,
double *  pointZPtr 
)

Returns a point on a fuselage surface for a given fuselage and segment index.

Returns a point on a fuselage segment of a given fuselage in dependence of parameters eta and at all y-positions with 0.0 <= eta <= 1.0. For eta = 0.0 the point lies on the start profile of the segment, for eta = 1.0 it lies on the end profile of the segment. The point is returned in absolute world coordinates.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]fuselageIndexThe index of the fuselage, starting at 1
[in]segmentIndexThe index of the segment of the fuselage, starting at 1
[in]etaeta in the range 0.0 <= eta <= 1.0
[in]xposx position of a cutting plane
[in]pointIndexDefines witch point if more than one.
[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 fuselageIndex or segmentIndex are not valid
  • TIGL_NULL_POINTER if pointXPtr, pointYPtr or pointZPtr are null pointers
  • TIGL_ERROR if some other error occurred
TiglReturnCode tiglFuselageGetPointOnYPlane ( TiglCPACSConfigurationHandle  cpacsHandle,
int  fuselageIndex,
int  segmentIndex,
double  eta,
double  ypos,
int  pointIndex,
double *  pointXPtr,
double *  pointYPtr,
double *  pointZPtr 
)

Returns a point on a fuselage surface for a given fuselage and segment index.

Returns a point on a fuselage segment of a given fuselage in dependence of parameters eta and at all y-positions with 0.0 <= eta <= 1.0. For eta = 0.0 the point lies on the start profile of the segment, for eta = 1.0 it lies on the end profile of the segment. The point is returned in absolute world coordinates.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]fuselageIndexThe index of the fuselage, starting at 1
[in]segmentIndexThe index of the segment of the fuselage, starting at 1
[in]etaeta in the range 0.0 <= eta <= 1.0
[in]yposY position
[in]pointIndexDefines witch point if more than one.
[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 fuselageIndex or segmentIndex are not valid
  • TIGL_NULL_POINTER if pointXPtr, pointYPtr or pointZPtr are null pointers
  • TIGL_ERROR if some other error occurred
TiglReturnCode tiglFuselageGetProfileName ( TiglCPACSConfigurationHandle  cpacsHandle,
int  fuselageIndex,
int  sectionIndex,
int  elementIndex,
char **  profileNamePtr 
)

Returns the name of a fuselage 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]fuselageIndexThe index of a fuselage, 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 = tiglFuselageGetProfileName(cpacsHandle, fuselage, 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 fuselageIndex, sectionIndex or elementIndex are not valid
  • TIGL_NULL_POINTER if profileNamePtr is a null pointer
  • TIGL_ERROR if some other error occurred
TiglReturnCode tiglFuselageGetSectionCenter ( TiglCPACSConfigurationHandle  cpacsHandle,
const char *  fuselageSegmentUID,
double  eta,
double *  pointX,
double *  pointY,
double *  pointZ 
)

Returns the section center of a fuselage.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]fuselageSegmentUIDUID of the segment
[in]etaParameter value from where on the given object the section is cut out, eta in the range 0.0 <= eta <= 1.0
[out]pointXPointer to the x-coordinate of the section center point
[out]pointYPointer to the y-coordinate of the section center point
[out]pointZPointer to the z-coordinate of the section center point
Returns
  • TIGL_SUCCESS if a point was found
  • TIGL_NOT_FOUND if no configuration was found for the given handle
  • TIGL_UID_ERROR if UID is invalid or not a fuselage segment
  • TIGL_NULL_POINTER if pointX, pointY or pointZ are null pointers
  • TIGL_MATH_ERROR if eta is out of range, i.e., not in [0, 1]
  • TIGL_ERROR if some other error occurred
TiglReturnCode tiglFuselageGetSectionCount ( TiglCPACSConfigurationHandle  cpacsHandle,
int  fuselageIndex,
int *  sectionCount 
)

Returns the number of sections of a fuselage.

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

Usage example:

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

Returns the UID of a section of a fuselage. 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]fuselageIndexThe index of a fuselage, starting at 1
[in]sectionIndexThe index of a section, starting at 1
[out]uidNamePtrThe uid of the fuselage

Usage example:

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

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

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]fuselageIndexThe index of the fuselage, 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 fuselageIndex is not valid
  • TIGL_NULL_POINTER if segmentCountPtr is a null pointer
  • TIGL_ERROR if some other error occurred
TiglReturnCode tiglFuselageGetSegmentIndex ( TiglCPACSConfigurationHandle  cpacsHandle,
const char *  segmentUID,
int *  segmentIndexPtr,
int *  fuselageIndexPtr 
)

Returns the Index of a segment of a fuselage.

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

Usage example:

   TiglReturnCode returnCode;
   int segmentIndex, fuselageIndex;
   returnCode = tiglFuselageGetSegmentIndex(cpacsHandle, segmentUID, &segmentIndex, &fuselageIndex);
   printf("The Index of the segment of fuselage %d is %d\n", fuselageIndex, segmentIndex);
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no configuration was found for the given handle
  • TIGL_INDEX_ERROR if fuselageIndex 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
TiglReturnCode tiglFuselageGetSegmentUID ( TiglCPACSConfigurationHandle  cpacsHandle,
int  fuselageIndex,
int  segmentIndex,
char **  uidNamePtr 
)

Returns the UID of a segment of a fuselage. 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]fuselageIndexThe index of a fuselage, starting at 1
[in]segmentIndexThe index of a segment, starting at 1
[out]uidNamePtrThe uid of the fuselage

Usage example:

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

Returns the count of segments connected to the start section of a given fuselage segment.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]fuselageIndexThe index of a fuselage, 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 fuselageIndex or segmentIndex are not valid
  • TIGL_NULL_POINTER if segmentCountPtr is a null pointer
  • TIGL_ERROR if some other error occurred
TiglReturnCode tiglFuselageGetStartConnectedSegmentIndex ( TiglCPACSConfigurationHandle  cpacsHandle,
int  fuselageIndex,
int  segmentIndex,
int  n,
int *  connectedIndexPtr 
)

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

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]fuselageIndexThe index of a fuselage, starting at 1
[in]segmentIndexThe index of a segment, starting at 1
[in]nn-th segment searched, 1 <= n <= tiglFuselageGetStartConnectedSegmentCount(...)
[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 fuselageIndex, segmentIndex or n are not valid
  • TIGL_NULL_POINTER if segmentIndexPtr is a null pointer
  • TIGL_ERROR if some other error occurred
TiglReturnCode tiglFuselageGetStartSectionAndElementIndex ( TiglCPACSConfigurationHandle  cpacsHandle,
int  fuselageIndex,
int  segmentIndex,
int *  sectionIndexPtr,
int *  elementIndexPtr 
)

Returns the section index and section element index of the start side of a given fuselage segment.

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

Returns the section UID and section element UID of the start side of a given fuselage segment.

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

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]fuselageIndexThe index of a fuselage, starting at 1
[in]segmentIndexThe index of a segment, starting at 1
[out]sectionUIDPtrThe section UID of the start side
[out]elementUIDPtrThe section element UID of the start side
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no configuration was found for the given handle
  • TIGL_INDEX_ERROR if fuselageIndex or segmentIndex are not valid
  • TIGL_ERROR if some other error occurred
TiglReturnCode tiglFuselageGetSymmetry ( TiglCPACSConfigurationHandle  cpacsHandle,
int  fuselageIndex,
TiglSymmetryAxis symmetryAxisPtr 
)

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

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]fuselageIndexIndex of the fuselage in the cpacs file
[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 fuselageIndex is less or equal zero
  • TIGL_ERROR if some other error occurred
TiglReturnCode tiglFuselageGetUID ( TiglCPACSConfigurationHandle  cpacsHandle,
int  fuselageIndex,
char **  uidNamePtr 
)

Returns the UID of a fuselage. 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]fuselageIndexThe index of a fuselage, starting at 1
[out]uidNamePtrThe uid of the fuselage

Usage example:

   TiglReturnCode returnCode;
   char* uidPtr = 0;
   returnCode = tiglFuselageGetUID(cpacsHandle, fuselage, &uidPtr);
   printf("The UID of the fuselage 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 fuselageIndex, sectionIndex or elementIndex are not valid
  • TIGL_NULL_POINTER if profileNamePtr is a null pointer
  • TIGL_ERROR if some other error occurred
TiglReturnCode tiglFuselageSetGetPointBehavior ( TiglCPACSConfigurationHandle  cpacsHandle,
TiglGetPointBehavior  behavior 
)

Sets the behavior of the tiglFuselageGetPoint function.

This function sets the behavior of the tiglFuselageGetPoint function. 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 coordinates along the center line of the fuselage segment, xsi is interpreted as a relative circumference between 0 and 1, and the resulting point lies on the linear loft of the fuselage segment.

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
TiglReturnCode tiglGetFuselageCount ( TiglCPACSConfigurationHandle  cpacsHandle,
int *  fuselageCountPtr 
)

Returns the number of fuselages in a CPACS configuration.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[out]fuselageCountPtrPointer to the number of fuselages
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no configuration was found for the given handle
  • TIGL_NULL_POINTER if fuselageCountPtr is a null pointer
  • TIGL_ERROR if some other error occurred