3.4.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. Note that the symmetry attribute is ignored. More...
 
TiglReturnCode tiglComponentGetHashCode (TiglCPACSConfigurationHandle cpacsHandle, const char *componentUID, int *hashCodePtr)
 Returns a unique HashCode for a geometric component. More...
 
TiglReturnCode tiglComponentGetType (TiglCPACSConfigurationHandle cpacsHandle, const char *componentUID, TiglGeometricComponentType *typePtr)
 Returns the type of 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...
 
TiglReturnCode tiglConfigurationGetWithDuctCutouts (TiglCPACSConfigurationHandle cpacsHandle, TiglBoolean *WithDuctCutoutsFlag)
 Gets the flag, ether ducts defined in CPACS shall be removed from using Boolean operations, if any ducts are defined in the CPACS configuration. More...
 
TiglReturnCode tiglConfigurationSetWithDuctCutouts (TiglCPACSConfigurationHandle cpacsHandle, TiglBoolean WithDuctCutoutsFlag)
 Sets a flag, whether ducts defined in CPACS shall be removed from using Boolean operations. 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

◆ tiglCheckPointInside()

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. Note that the symmetry attribute is ignored.

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.

◆ tiglComponentGetHashCode()

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

◆ tiglComponentGetType()

TiglReturnCode tiglComponentGetType ( TiglCPACSConfigurationHandle  cpacsHandle,
const char *  componentUID,
TiglGeometricComponentType typePtr 
)

Returns the type of a geometric component.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]componentUIDThe uid of the component for which the hash should be computed
[out]typePtrA pointer to a TiglGeometricComponentType to store the result
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no configuration was found for the given handle
  • TIGL_UID_ERROR if the uid is invalid or not a known geometric component
  • TIGL_NULL_POINTER if componentUID or typePtr is a null pointer
  • TIGL_ERROR if some other error occurred

◆ tiglConfigurationGetBoundingBox()

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

◆ tiglConfigurationGetLength()

TiglReturnCode tiglConfigurationGetLength ( TiglCPACSConfigurationHandle  cpacsHandle,
double *  pLength 
)

Returns the length of the plane.

The calculation of the airplane length 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

◆ tiglConfigurationGetWithDuctCutouts()

TiglReturnCode tiglConfigurationGetWithDuctCutouts ( TiglCPACSConfigurationHandle  cpacsHandle,
TiglBoolean WithDuctCutoutsFlag 
)

Gets the flag, ether ducts defined in CPACS shall be removed from using Boolean operations, if any ducts are defined in the CPACS configuration.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[out]WithDuctCutoutsFlagflag, whether all geometric components shall be build with duct cutouts
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no configuration was found for the given handle
  • TIGL_ERROR if some other error occurred

◆ tiglConfigurationSetWithDuctCutouts()

TiglReturnCode tiglConfigurationSetWithDuctCutouts ( TiglCPACSConfigurationHandle  cpacsHandle,
TiglBoolean  WithDuctCutoutsFlag 
)

Sets a flag, whether ducts defined in CPACS shall be removed from using Boolean operations.

By default ducts are disabled. If no ducts are defined in CPACS, this function has no effect.

Currently, ducts are only removed from fuselages and wings.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]WithDuctCutoutsFlagflag, whether all geometric components shall be build with duct cutouts
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no configuration was found for the given handle
  • TIGL_ERROR if some other error occurred

◆ tiglGetErrorString()

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.

◆ tiglSetDebugDataDirectory()

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.