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... | |
Generic utility functions for geometric components that fits not only to wings or fuselages.
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!
[in] | cpacsHandle | Handle for the CPACS configuration |
[in] | px | X coordinate of point |
[in] | py | Y coordinate of point |
[in] | pz | Z coordinate of point |
[in] | componentUID | UID of the component (e.g. a fuselage UID, wing UID, wing segment UID ...) |
[out] | isInside | Returns, whether the point lies inside the object or not. |
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.
[in] | cpacsHandle | Handle for the CPACS configuration |
[in] | componentUID | The uid of the component for which the hash should be computed |
[out] | hashCodePtr | The pointer to a hash value to represent this shape |
TiglReturnCode tiglComponentGetType | ( | TiglCPACSConfigurationHandle | cpacsHandle, |
const char * | componentUID, | ||
TiglGeometricComponentType * | typePtr | ||
) |
Returns the type of a geometric component.
[in] | cpacsHandle | Handle for the CPACS configuration |
[in] | componentUID | The uid of the component for which the hash should be computed |
[out] | typePtr | A pointer to a TiglGeometricComponentType to store the result |
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!
[in] | cpacsHandle | Handle for the CPACS configuration |
[out] | minX | Minimum x value |
[out] | minY | Minimum y value |
[out] | minZ | Minimum z value |
[out] | maxX | Maximum x value |
[out] | maxY | Maximum y value |
[out] | maxZ | Maximum z value |
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!
[in] | cpacsHandle | Handle for the CPACS configuration |
[out] | pLength | Length of plane |
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.
[in] | cpacsHandle | Handle for the CPACS configuration |
[out] | WithDuctCutoutsFlag | flag, whether all geometric components shall be build with duct cutouts |
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.
[in] | cpacsHandle | Handle for the CPACS configuration |
[in] | WithDuctCutoutsFlag | flag, whether all geometric components shall be build with duct cutouts |
const char* tiglGetErrorString | ( | TiglReturnCode | errorCode | ) |
Translates an error code into a string.
[in] | errorCode | Return value of a tigl function |
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.
[in] | directory | Path of the debugging directory. |