3.0.0
Generic utility functions.

Functions

TiglReturnCode tiglCheckPointInside (TiglCPACSConfigurationHandle cpacsHandle, double px, double py, double pz, const char *componentUID, TiglBoolean *isInside)
 Checks whether a point lies inside the given geometric object. More...
 
TiglReturnCode tiglComponentGetHashCode (TiglCPACSConfigurationHandle cpacsHandle, const char *componentUID, int *hashCodePtr)
 Returns a unique HashCode for a geometric component. More...
 
TiglReturnCode tiglConfigurationGetBoundingBox (TiglCPACSConfigurationHandle cpacsHandle, double *minX, double *minY, double *minZ, double *maxX, double *maxY, double *maxZ)
 Computes the bounding box coordinates of the configuration. More...
 
TiglReturnCode tiglConfigurationGetLength (TiglCPACSConfigurationHandle cpacsHandle, double *pLength)
 Returns the length of the plane. More...
 
const char * tiglGetErrorString (TiglReturnCode errorCode)
 Translates an error code into a string. More...
 
void tiglSetDebugDataDirectory (const char *directory)
 Set the directory path for debug data. More...
 

Detailed Description

Generic utility functions for geometric components that fits not only to wings or fuselages.

Function Documentation

TiglReturnCode tiglCheckPointInside ( TiglCPACSConfigurationHandle  cpacsHandle,
double  px,
double  py,
double  pz,
const char *  componentUID,
TiglBoolean isInside 
)

Checks whether a point lies inside the given geometric object.

This function works only for solid objects!

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]pxX coordinate of point
[in]pyY coordinate of point
[in]pzZ coordinate of point
[in]componentUIDUID of the component (e.g. a fuselage UID, wing UID, wing segment UID ...)
[out]isInsideReturns, whether the point lies inside the object or not.
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 does not exist or is not a geometric object.
  • TIGL_NULL_POINTER if componentUID or isInside are null.
  • TIGL_ERROR if some error occurred, e.g. the component is not a solid object.
TiglReturnCode tiglComponentGetHashCode ( TiglCPACSConfigurationHandle  cpacsHandle,
const char *  componentUID,
int *  hashCodePtr 
)

Returns a unique HashCode for a geometric component.

The component, for example a wing or a fuselage, could be specified via its UID. The HashCode is the same as long as the geometry of this component has not changed. The HashCode is valid through the current session only! The hash value is computed from the value of the underlying shape reference.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]componentUIDThe uid of the component for which the hash should be computed
[out]hashCodePtrThe pointer to a hash value to represent this shape
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no configuration was found for the given handle
  • TIGL_NULL_POINTER if surfaceAreaPtr is a null pointer
  • TIGL_ERROR if some other error occurred
TiglReturnCode tiglConfigurationGetBoundingBox ( TiglCPACSConfigurationHandle  cpacsHandle,
double *  minX,
double *  minY,
double *  minZ,
double *  maxX,
double *  maxY,
double *  maxZ 
)

Computes the bounding box coordinates of the configuration.

Note, that the resulting values are a fast but very rough approximation!

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[out]minXMinimum x value
[out]minYMinimum y value
[out]minZMinimum z value
[out]maxXMaximum x value
[out]maxYMaximum y value
[out]maxZMaximum z value
Returns
Error code
TiglReturnCode tiglConfigurationGetLength ( TiglCPACSConfigurationHandle  cpacsHandle,
double *  pLength 
)

Returns the length of the plane.

The calculation of the airplane lenght is realized as follows:

All part of the configuration (currently all wing and fuselage segments) are put into a bounding box. The length of the plane is returned as the length of the box in x-direction.

Note, that this resulting value is a fast but very rough approximation!

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[out]pLengthLength of plane
Returns
Error code
const char* tiglGetErrorString ( TiglReturnCode  errorCode)

Translates an error code into a string.

Parameters
[in]errorCodeReturn value of a tigl function
Returns
Error code as a string.
void tiglSetDebugDataDirectory ( const char *  directory)

Set the directory path for debug data.

These data are written, in case a tigl function has an internal error.

By default (directory==NULL), these files are written into the current working directory. There, the subdirectory CrashInfo is created.

Parameters
[in]directoryPath of the debugging directory.