3.2.3
tigl.h File Reference

Declaration of the TIGL C interface. More...

#include "tixi.h"
#include <stdio.h>

Macros

#define TIGL_COMMON_EXPORT
 
#define TIGL_H
 

Typedefs

typedef enum TiglAlgorithmCode TiglAlgorithmCode
 Typedef for possible algorithm types used in calculations. More...
 
typedef enum TiglAxis TiglAxis
 
typedef enum TiglBoolean TiglBoolean
 Definition of boolean type used in TIGL. More...
 
typedef enum TiglContinuity TiglContinuity
 
typedef enum TiglControlSurfaceType TiglControlSurfaceType
 
typedef enum TiglCoordinateSystem TiglCoordinateSystem
 
typedef int TiglCPACSConfigurationHandle
 Datatype for a CPACS configuration handle. More...
 
typedef unsigned long TiglGeometricComponentIntent
 
typedef enum TiglGeometricComponentIntentFlags TiglGeometricComponentIntentFlags
 
typedef enum TiglGeometricComponentType TiglGeometricComponentType
 
typedef enum TiglGetPointBehavior TiglGetPointBehavior
 
typedef enum TiglImportExportFormat TiglImportExportFormat
 Definition of the different file formats used for import/export used in TIGL. More...
 
typedef enum TiglLoftSide TiglLoftSide
 
typedef enum TiglLogLevel TiglLogLevel
 Definition of logging levels. More...
 
typedef enum TiglReturnCode TiglReturnCode
 Definition of error return type. More...
 
typedef enum TiglShapeModifier TiglShapeModifier
 
typedef const char ** TiglStringList
 
typedef enum TiglStructureType TiglStructureType
 
typedef enum TiglSymmetryAxis TiglSymmetryAxis
 Definition of Symmetry Axis used in TIGL. More...
 

Enumerations

enum  TiglAlgorithmCode { TIGL_INTERPOLATE_LINEAR_WIRE = 0 , TIGL_INTERPOLATE_BSPLINE_WIRE = 1 , TIGL_APPROXIMATE_BSPLINE_WIRE = 2 }
 
enum  TiglAxis { TIGL_NO_AXIS = 0 , TIGL_X_AXIS = 1 , TIGL_Y_AXIS = 2 , TIGL_Z_AXIS = 3 }
 
enum  TiglBoolean { TIGL_FALSE = 0 , TIGL_TRUE = 1 }
 
enum  TiglContinuity { C0 = 0 , C1 = 1 , C2 = 2 }
 
enum  TiglControlSurfaceType { TRAILING_EDGE_DEVICE = 0 , LEADING_EDGE_DEVICE = 1 , SPOILER = 2 }
 
enum  TiglCoordinateSystem { GLOBAL_COORDINATE_SYSTEM = 0 , WING_COORDINATE_SYSTEM = 1 , FUSELAGE_COORDINATE_SYSTEM = 2 }
 
enum  TiglGeometricComponentIntentFlags { TIGL_INTENT_PHYSICAL = 1 , TIGL_INTENT_LOGICAL = 2 , TIGL_INTENT_INNER_STRUCTURE = 4 , TIGL_INTENT_OUTER_AERO_SURFACE = 8 }
 
enum  TiglGeometricComponentType {
  TIGL_COMPONENT_PLANE , TIGL_COMPONENT_FUSELAGE , TIGL_COMPONENT_WING , TIGL_COMPONENT_SEGMENT ,
  TIGL_COMPONENT_WINGSEGMENT , TIGL_COMPONENT_FUSELSEGMENT , TIGL_COMPONENT_WINGCOMPSEGMENT , TIGL_COMPONENT_WINGSHELL ,
  TIGL_COMPONENT_WINGRIB , TIGL_COMPONENT_WINGSPAR , TIGL_COMPONENT_WINGCELL , TIGL_COMPONENT_GENERICSYSTEM ,
  TIGL_COMPONENT_ROTOR , TIGL_COMPONENT_ROTORBLADE , TIGL_COMPONENT_ATTACHED_ROTORBLADE , TIGL_COMPONENT_PRESSURE_BULKHEAD ,
  TIGL_COMPONENT_CROSS_BEAM_STRUT , TIGL_COMPONENT_CARGO_DOOR , TIGL_COMPONENT_LONG_FLOOR_BEAM , TIGL_COMPONENT_EXTERNAL_OBJECT ,
  TIGL_COMPONENT_FARFIELD , TIGL_COMPONENT_ENGINE_PYLON , TIGL_COMPONENT_ENGINE_NACELLE , TIGL_COMPONENT_FUSELAGE_WALL ,
  TIGL_COMPONENT_CONTROL_SURFACE_DEVICE , TIGL_COMPONENT_OTHER
}
 
enum  TiglGetPointBehavior { asParameterOnSurface = 0 , onLinearLoft , numGetPointBehaviors }
 Options for the behavior of the GetPoint functions. More...
 
enum  TiglImportExportFormat { TIGL_IMPORTEXPORT_IGES = 0 , TIGL_IMPORTEXPORT_STEP = 1 , TIGL_IMPORTEXPORT_STL = 2 , TIGL_IMPORTEXPORT_VTK = 3 }
 
enum  TiglLoftSide { UPPER_SIDE = 0 , LOWER_SIDE = 1 }
 
enum  TiglLogLevel {
  TILOG_SILENT =0 , TILOG_ERROR =1 , TILOG_WARNING =2 , TILOG_INFO =3 ,
  TILOG_DEBUG =4 , TILOG_DEBUG1 =5 , TILOG_DEBUG2 =6 , TILOG_DEBUG3 =7 ,
  TILOG_DEBUG4 =8
}
 
enum  TiglReturnCode {
  TIGL_SUCCESS = 0 , TIGL_ERROR = 1 , TIGL_NULL_POINTER = 2 , TIGL_NOT_FOUND = 3 ,
  TIGL_XML_ERROR = 4 , TIGL_OPEN_FAILED = 5 , TIGL_CLOSE_FAILED = 6 , TIGL_INDEX_ERROR = 7 ,
  TIGL_STRING_TRUNCATED = 8 , TIGL_WRONG_TIXI_VERSION = 9 , TIGL_UID_ERROR = 10 , TIGL_WRONG_CPACS_VERSION = 11 ,
  TIGL_UNINITIALIZED = 12 , TIGL_MATH_ERROR = 13 , TIGL_WRITE_FAILED = 14
}
 
enum  TiglShapeModifier { UNMODIFIED_SHAPE = 0 , SHARP_TRAILINGEDGE = 1 , BLUNT_TRAILINGEDGE = 2 }
 
enum  TiglStructureType { UPPER_SHELL = 0 , LOWER_SHELL = 1 , INNER_STRUCTURE = 2 }
 
enum  TiglSymmetryAxis {
  TIGL_NO_SYMMETRY = 0 , TIGL_X_Y_PLANE = 1 , TIGL_X_Z_PLANE = 2 , TIGL_Y_Z_PLANE = 3 ,
  TIGL_INHERIT_SYMMETRY = 4
}
 

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 tiglCloseCPACSConfiguration (TiglCPACSConfigurationHandle cpacsHandle)
 Closes a CPACS configuration and cleans up all memory used by the configuration. After closing a configuration the associated configuration handle is no longer valid. When the CPACS configuration has been closed, the companion tixi document can also be closed. 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 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 tiglExportComponent (TiglCPACSConfigurationHandle cpacsHandle, const char *uid, const char *fileName, double deflection)
 Exports a geometric component (e.g. a wing, a fuselage etc.) More...
 
TiglReturnCode tiglExportConfiguration (TiglCPACSConfigurationHandle cpacsHandle, const char *fileName, TiglBoolean fuseAllShapes, double deflection)
 Exports the whole configuration into a file. More...
 
TiglReturnCode tiglExportFusedBREP (TiglCPACSConfigurationHandle cpacsHandle, const char *filename)
 Exports the fused/trimmed geometry of a CPACS configuration to BREP format. More...
 
TiglReturnCode tiglExportFusedSTEP (TiglCPACSConfigurationHandle cpacsHandle, const char *filenamePtr)
 Exports the fused/trimmed geometry of a CPACS configuration to STEP format. More...
 
TiglReturnCode tiglExportFusedWingFuselageIGES (TiglCPACSConfigurationHandle cpacsHandle, const char *filenamePtr)
 Exports the boolean fused geometry of a CPACS configuration to IGES format. More...
 
TiglReturnCode tiglExportFuselageBREPByUID (TiglCPACSConfigurationHandle cpacsHandle, const char *fuselageUID, const char *filename)
 Exports the boolean fused geometry of a fuselage (selected by uid) to BREP format. More...
 
TiglReturnCode tiglExportFuselageColladaByUID (const TiglCPACSConfigurationHandle cpacsHandle, const char *fuselageUID, const char *filename, double deflection)
 Exports the boolean fused geometry of a fuselage (selected by uid) meshed to Collada (*.dae) format. More...
 
TiglReturnCode tiglExportIGES (TiglCPACSConfigurationHandle cpacsHandle, const char *filenamePtr)
 Exports the geometry of a CPACS configuration to IGES format. More...
 
TiglReturnCode tiglExportMeshedFuselageSTL (TiglCPACSConfigurationHandle cpacsHandle, int fuselageIndex, const char *filenamePtr, double deflection)
 Exports the boolean fused geometry of a fuselage meshed to STL format. More...
 
TiglReturnCode tiglExportMeshedFuselageSTLByUID (TiglCPACSConfigurationHandle cpacsHandle, const char *fuselageUID, const char *filenamePtr, double deflection)
 Exports the boolean fused geometry of a fuselage meshed to STL format. More...
 
TiglReturnCode tiglExportMeshedFuselageVTKByIndex (const TiglCPACSConfigurationHandle cpacsHandle, const int fuselageIndex, const char *filenamePtr, double deflection)
 Exports the boolean fused geometry of a fuselage (selected by index) meshed to VTK format. More...
 
TiglReturnCode tiglExportMeshedFuselageVTKByUID (const TiglCPACSConfigurationHandle cpacsHandle, const char *fuselageUID, const char *filenamePtr, double deflection)
 Exports the boolean fused geometry of a fuselage (selected by uid) meshed to VTK format. More...
 
TiglReturnCode tiglExportMeshedGeometrySTL (TiglCPACSConfigurationHandle cpacsHandle, const char *filenamePtr, double deflection)
 Exports the boolean fused geometry of the whole configuration meshed to STL format. More...
 
TiglReturnCode tiglExportMeshedGeometryVTK (const TiglCPACSConfigurationHandle cpacsHandle, const char *filenamePtr, double deflection)
 Exports the boolean fused geometry of the whole configuration meshed to VTK format. More...
 
TiglReturnCode tiglExportMeshedGeometryVTKSimple (const TiglCPACSConfigurationHandle cpacsHandle, const char *filenamePtr, double deflection)
 Exports the boolean fused geometry of the whole configuration meshed to VTK format. More...
 
TiglReturnCode tiglExportMeshedWingSTL (TiglCPACSConfigurationHandle cpacsHandle, int wingIndex, const char *filenamePtr, double deflection)
 Exports the boolean fused geometry of a wing meshed to STL format. More...
 
TiglReturnCode tiglExportMeshedWingSTLByUID (TiglCPACSConfigurationHandle cpacsHandle, const char *wingUID, const char *filenamePtr, double deflection)
 Exports the boolean fused geometry of a wing meshed to STL format. More...
 
TiglReturnCode tiglExportMeshedWingVTKByIndex (const TiglCPACSConfigurationHandle cpacsHandle, const int wingIndex, const char *filenamePtr, const double deflection)
 Exports the boolean fused geometry of a wing (selected by id) meshed to VTK format. More...
 
TiglReturnCode tiglExportMeshedWingVTKByUID (const TiglCPACSConfigurationHandle cpacsHandle, const char *wingUID, const char *filenamePtr, double deflection)
 Exports the boolean fused geometry of a wing (selected by UID) meshed to VTK format. More...
 
TiglReturnCode tiglExportMeshedWingVTKSimpleByUID (const TiglCPACSConfigurationHandle cpacsHandle, const char *wingUID, const char *filenamePtr, double deflection)
 Exports the boolean fused geometry of a wing (selected by UID) meshed to VTK format. More...
 
TiglReturnCode tiglExportSTEP (TiglCPACSConfigurationHandle cpacsHandle, const char *filenamePtr)
 Exports the geometry of a CPACS configuration to STEP format. More...
 
TiglReturnCode tiglExportWingBREPByUID (TiglCPACSConfigurationHandle cpacsHandle, const char *wingUID, const char *filename)
 Exports the boolean fused geometry of a wing (selected by uid) to BREP format. More...
 
TiglReturnCode tiglExportWingColladaByUID (const TiglCPACSConfigurationHandle cpacsHandle, const char *wingUID, const char *filename, double deflection)
 Exports the boolean fused geometry of a wing (selected by uid) meshed to Collada (*.dae) format. More...
 
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 tiglFuselageGetSegmentSurfaceArea (TiglCPACSConfigurationHandle cpacsHandle, int fuselageIndex, int segmentIndex, double *surfaceAreaPtr)
 Returns the surface area 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 tiglFuselageGetSegmentVolume (TiglCPACSConfigurationHandle cpacsHandle, int fuselageIndex, int segmentIndex, double *volumePtr)
 Returns the volume of a segment of a fuselage. 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 tiglFuselageGetSurfaceArea (TiglCPACSConfigurationHandle cpacsHandle, int fuselageIndex, double *surfaceAreaPtr)
 Returns the surface area of the fuselage. Currently, the area includes also the faces on the fuselage symmetry plane (in case of a symmetric wing). This is in particular a problem for fuselages, where only one half side is defined in CPACS. In future releases, these faces will not belong anymore to the surface area calculation. 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 tiglFuselageGetVolume (TiglCPACSConfigurationHandle cpacsHandle, int fuselageIndex, double *volumePtr)
 Returns the volume of the fuselage. More...
 
TiglReturnCode tiglFuselageSetGetPointBehavior (TiglCPACSConfigurationHandle cpacsHandle, TiglGetPointBehavior behavior)
 Sets the behavior of the tiglFuselageGetPoint function. 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 tiglGetCPACSTixiHandle (TiglCPACSConfigurationHandle cpacsHandle, TixiDocumentHandle *tixiHandlePtr)
 Returns the underlying TixiDocumentHandle for a given CPACS configuration handle. More...
 
TiglReturnCode tiglGetCurveIntersection (TiglCPACSConfigurationHandle cpacsHandle, const char *curvesID1, int curve1Idx, const char *curvesID2, int curve2Idx, double tolerance, char **intersectionID)
 tiglGetCurveIntersection computes intersection point of two (intersection) curves. Both curves are the result of a previous intersection (e.g. Fuselage-Wing Intersection). More...
 
TiglReturnCode tiglGetCurveIntersectionCount (TiglCPACSConfigurationHandle cpacsHandle, const char *intersectionID, int *pointCount)
 tiglGetCurveIntersectionCount returns the number of intersection points computed by tiglGetCurveIntersection for the given intersectionID. More...
 
TiglReturnCode tiglGetCurveIntersectionPoint (TiglCPACSConfigurationHandle cpacsHandle, const char *intersectionID, int pointIdx, double *pointX, double *pointY, double *pointZ)
 tiglGetCurveIntersectionPoint returns an intersection point calculated by tiglGetCurveIntersection More...
 
TiglReturnCode tiglGetCurveParameter (TiglCPACSConfigurationHandle cpacsHandle, const char *curveID, int curveIdx, double pointX, double pointY, double pointZ, double *eta)
 tiglGetCurveParameter projects a point onto a curve of an intersection line. The intersection line is specified by a curveID. The curveID can be calculated using tiglIntersectComponents, tiglIntersectWithPlane or tiglIntersectWithPlaneSegment. The function returns the parameter eta of the projected point on the curve. More...
 
const char * tiglGetErrorString (TiglReturnCode errorCode)
 Translates an error code into a string. More...
 
TiglReturnCode tiglGetFuselageCount (TiglCPACSConfigurationHandle cpacsHandle, int *fuselageCountPtr)
 Returns the number of fuselages in a CPACS configuration. More...
 
TiglReturnCode tiglGetRotorCount (TiglCPACSConfigurationHandle cpacsHandle, int *rotorCountPtr)
 Returns the number of rotors in a CPACS configuration. More...
 
const char * tiglGetVersion ()
 Returns the version number of this TIGL version. More...
 
TiglReturnCode tiglGetWingCount (TiglCPACSConfigurationHandle cpacsHandle, int *wingCountPtr)
 Returns the number of wings in a CPACS configuration. More...
 
TiglReturnCode tiglIntersectComponents (TiglCPACSConfigurationHandle cpacsHandle, const char *componentUidOne, const char *componentUidTwo, char **intersectionID)
 tiglIntersectComponents computes the intersection line(s) between two shapes specified by their CPACS uid. It returns an intersection ID for further computations on the result. To query points on the intersection line, tiglIntersectGetPoint has to be called. More...
 
TiglReturnCode tiglIntersectGetLineCount (TiglCPACSConfigurationHandle cpacsHandle, const char *intersectionID, int *lineCount)
 tiglIntersectGetLineCount returns the number of intersection lines computed by tiglIntersectComponents, tiglIntersectWithPlane or tiglIntersectWithPlaneSegment for the given intersectionID. More...
 
TiglReturnCode tiglIntersectGetPoint (TiglCPACSConfigurationHandle cpacsHandle, const char *intersectionID, int lineIdx, double eta, double *pointX, double *pointY, double *pointZ)
 tiglIntersectGetPoint samples a point on an intersection line calculated by tiglIntersectComponents, tiglIntersectWithPlane or tiglIntersectWithPlaneSegment. More...
 
TiglReturnCode tiglIntersectWithPlane (TiglCPACSConfigurationHandle cpacsHandle, const char *componentUid, double px, double py, double pz, double nx, double ny, double nz, char **intersectionID)
 tiglIntersectWithPlane computes the intersection line(s) between a shape and a plane. It returns an intersection ID for further computations on the result. To query points on the intersection line, tiglIntersectGetPoint has to be called. More...
 
TiglReturnCode tiglIntersectWithPlaneSegment (TiglCPACSConfigurationHandle cpacsHandle, const char *componentUid, double p1x, double p1y, double p1z, double p2x, double p2y, double p2z, double wx, double wy, double wz, char **intersectionID)
 tiglIntersectWithPlaneSegment computes the intersection line(s) between a shape and a plane segment. The plane segment is defined by p(u,v) = P1*(1-u) + P2*u + w*v, with u in [0,1] (see image). More...
 
TiglReturnCode tiglIsCPACSConfigurationHandleValid (TiglCPACSConfigurationHandle cpacsHandle, TiglBoolean *isValidPtr)
 Checks if a given CPACS configuration handle is a valid. More...
 
TiglReturnCode tiglLogSetFileEnding (const char *ending)
 Sets the file ending for logging files. Default is "log". More...
 
TiglReturnCode tiglLogSetTimeInFilenameEnabled (TiglBoolean enabled)
 Enables or disables appending a unique date/time identifier inside the log file name (behind the file prefix). By default, the time identifier is enabled. More...
 
TiglReturnCode tiglLogSetVerbosity (TiglLogLevel level)
 Set the console verbosity level. More...
 
TiglReturnCode tiglLogToFileDisabled ()
 Disabled file logging. If a log file is currently opened by TiGL it will be closed. The log messages are printed to console. This is the default logging mechanism of TIGL. More...
 
TiglReturnCode tiglLogToFileEnabled (const char *filePrefix)
 Sets up the tigl logging mechanism to send all log messages into a file. More...
 
TiglReturnCode tiglLogToFileStreamEnabled (FILE *fp)
 Sets up the tigl logging mechanism to send all log messages into an already opened file. More...
 
TiglReturnCode tiglOpenCPACSConfiguration (TixiDocumentHandle tixiHandle, const char *configurationUID, TiglCPACSConfigurationHandle *cpacsHandlePtr)
 Opens a CPACS configuration and builds up the data and geometry structure in memory. More...
 
TiglReturnCode tiglProfileGetBSplineCount (TiglCPACSConfigurationHandle cpacsHandle, const char *profileUID, int *curveCount)
 Returns the number of curves the given profile is made of. More...
 
TiglReturnCode tiglProfileGetBSplineData (TiglCPACSConfigurationHandle cpacsHandle, const char *profileUID, int curveid, int nControlPoints, double *cpx, double *cpy, double *cpz, int nKnots, double *knots)
 Returns the B-Spline data of the given profile curve. This includes the knot vector and the control points of the B-Spline. More...
 
TiglReturnCode tiglProfileGetBSplineDataSizes (TiglCPACSConfigurationHandle cpacsHandle, const char *profileUID, int curveid, int *degree, int *nControlPoints, int *nKnots)
 Returns the B-Spline data sizes for a given curve on a profile. This includes size of the knot vector, size of the control point vector and degree of the spline. More...
 
TiglReturnCode tiglRotorBladeGetAzimuthAngle (TiglCPACSConfigurationHandle cpacsHandle, int rotorIndex, int rotorBladeIndex, double *azimuthAnglePtr)
 Returns the azimuth angle of a rotor blade in degrees. More...
 
TiglReturnCode tiglRotorBladeGetLocalChord (TiglCPACSConfigurationHandle cpacsHandle, int rotorIndex, int rotorBladeIndex, int segmentIndex, double eta, double *chordPtr)
 Returns the local chord length of a rotor blade. More...
 
TiglReturnCode tiglRotorBladeGetLocalRadius (TiglCPACSConfigurationHandle cpacsHandle, int rotorIndex, int rotorBladeIndex, int segmentIndex, double eta, double *radiusPtr)
 Returns the local radius of a rotor blade. More...
 
TiglReturnCode tiglRotorBladeGetLocalTwistAngle (TiglCPACSConfigurationHandle cpacsHandle, int rotorIndex, int rotorBladeIndex, int segmentIndex, double eta, double *twistAnglePtr)
 Returns the local twist angle [deg] of a rotor blade. More...
 
TiglReturnCode tiglRotorBladeGetPlanformArea (TiglCPACSConfigurationHandle cpacsHandle, int rotorIndex, int rotorBladeIndex, double *planformAreaPtr)
 Returns the planform area of the rotor blade. More...
 
TiglReturnCode tiglRotorBladeGetRadius (TiglCPACSConfigurationHandle cpacsHandle, int rotorIndex, int rotorBladeIndex, double *radiusPtr)
 Returns the radius of a rotor blade. More...
 
TiglReturnCode tiglRotorBladeGetSurfaceArea (TiglCPACSConfigurationHandle cpacsHandle, int rotorIndex, int rotorBladeIndex, double *surfaceAreaPtr)
 Returns the surface area of the rotor blade. More...
 
TiglReturnCode tiglRotorBladeGetTipSpeed (TiglCPACSConfigurationHandle cpacsHandle, int rotorIndex, int rotorBladeIndex, double *tipSpeedPtr)
 Returns the tip speed of a rotor blade [m/s]. More...
 
TiglReturnCode tiglRotorBladeGetVolume (TiglCPACSConfigurationHandle cpacsHandle, int rotorIndex, int rotorBladeIndex, double *volumePtr)
 Returns the volume of the rotor blade. More...
 
TiglReturnCode tiglRotorBladeGetWingIndex (TiglCPACSConfigurationHandle cpacsHandle, int rotorIndex, int rotorBladeIndex, int *wingIndexPtr)
 Returns the index of the parent wing definition of a rotor blade. More...
 
TiglReturnCode tiglRotorBladeGetWingUID (TiglCPACSConfigurationHandle cpacsHandle, int rotorIndex, int rotorBladeIndex, char **wingUIDPtr)
 Returns the UID of the parent wing definition of a rotor blade. More...
 
TiglReturnCode tiglRotorGetIndex (TiglCPACSConfigurationHandle cpacsHandle, const char *rotorUID, int *rotorIndexPtr)
 Returns the Index of a rotor. More...
 
TiglReturnCode tiglRotorGetRadius (TiglCPACSConfigurationHandle cpacsHandle, int rotorIndex, double *radiusPtr)
 Returns the radius of the rotor. More...
 
TiglReturnCode tiglRotorGetReferenceArea (TiglCPACSConfigurationHandle cpacsHandle, int rotorIndex, double *referenceAreaPtr)
 Returns the reference area of the rotor. More...
 
TiglReturnCode tiglRotorGetRotorBladeCount (TiglCPACSConfigurationHandle cpacsHandle, int rotorIndex, int *rotorBladeCountPtr)
 Returns the total number of rotor blades attached to a rotor. More...
 
TiglReturnCode tiglRotorGetSolidity (TiglCPACSConfigurationHandle cpacsHandle, int rotorIndex, double *solidityPtr)
 Returns the solidity of the rotor. More...
 
TiglReturnCode tiglRotorGetSurfaceArea (TiglCPACSConfigurationHandle cpacsHandle, int rotorIndex, double *surfaceAreaPtr)
 Returns the surface area of the rotor. More...
 
TiglReturnCode tiglRotorGetTipSpeed (TiglCPACSConfigurationHandle cpacsHandle, int rotorIndex, double *tipSpeedPtr)
 Returns the tip speed of the rotor in [m/s]. More...
 
TiglReturnCode tiglRotorGetTotalBladePlanformArea (TiglCPACSConfigurationHandle cpacsHandle, int rotorIndex, double *totalBladePlanformAreaPtr)
 Returns the total blade planform area of the rotor. More...
 
TiglReturnCode tiglRotorGetUID (TiglCPACSConfigurationHandle cpacsHandle, int rotorIndex, char **uidNamePtr)
 Returns the UID of a rotor. The string returned must not be deleted by the caller via free(). It will be deleted when the CPACS configuration is closed. More...
 
TiglReturnCode tiglRotorGetVolume (TiglCPACSConfigurationHandle cpacsHandle, int rotorIndex, double *volumePtr)
 Returns the volume of the rotor. More...
 
TiglReturnCode tiglSaveCPACSConfiguration (const char *configurationUID, TiglCPACSConfigurationHandle cpacsHandle)
 Writes a CPACS configuration based on the data and geometry structure in memory. More...
 
void tiglSetDebugDataDirectory (const char *directory)
 Set the directory path for debug data. More...
 
TiglReturnCode tiglSetExportOptions (const char *exporter_name, const char *option_name, const char *option_value)
 Sets options for the geometry export. 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 tiglWingComponentSegmentGetMaterialCount (TiglCPACSConfigurationHandle cpacsHandle, const char *compSegmentUID, TiglStructureType structureType, double eta, double xsi, int *materialCount)
 Returns the number of materials defined at a point on the wing component segment surface. More...
 
TiglReturnCode tiglWingComponentSegmentGetMaterialThickness (TiglCPACSConfigurationHandle cpacsHandle, const char *compSegmentUID, TiglStructureType structureType, double eta, double xsi, int materialIndex, double *thickness)
 Returns one of the material thicknesses of a given point on the wing component segment surface. The number of materials on that point has to be first queried using tiglWingComponentSegmentGetMaterialCount. More...
 
TiglReturnCode tiglWingComponentSegmentGetMaterialUID (TiglCPACSConfigurationHandle cpacsHandle, const char *compSegmentUID, TiglStructureType structureType, double eta, double xsi, int materialIndex, char **uid)
 Returns one of the material UIDs of a given point on the wing component segment surface. The number of materials on that point has to be first queried using tiglWingComponentSegmentGetMaterialCount. 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 lenght 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 tiglWingGetReferenceArea (TiglCPACSConfigurationHandle cpacsHandle, int wingIndex, TiglSymmetryAxis symPlane, double *referenceAreaPtr)
 Returns the reference area of the wing. 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 tiglWingGetSegmentLowerSurfaceAreaTrimmed (TiglCPACSConfigurationHandle cpacsHandle, int wingIndex, int segmentIndex, double eta1, double xsi1, double eta2, double xsi2, double eta3, double xsi3, double eta4, double xsi4, double *surfaceArea)
 Computes the area of the trimmed lower wing segment surface. This function can be e.g. used to determine the area of the wing flaps. More...
 
TiglReturnCode tiglWingGetSegmentSurfaceArea (TiglCPACSConfigurationHandle cpacsHandle, int wingIndex, int segmentIndex, double *surfaceAreaPtr)
 Returns the surface area of a segment of a wing. This includes only the area of the upper and lower wing segment surface and does not include the trailing egde or any closing faces. 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 tiglWingGetSegmentUpperSurfaceAreaTrimmed (TiglCPACSConfigurationHandle cpacsHandle, int wingIndex, int segmentIndex, double eta1, double xsi1, double eta2, double xsi2, double eta3, double xsi3, double eta4, double xsi4, double *surfaceArea)
 Computes the area of the trimmed upper wing segment surface. This function can be e.g. used to determine the area of the wing flaps. More...
 
TiglReturnCode tiglWingGetSegmentVolume (TiglCPACSConfigurationHandle cpacsHandle, int wingIndex, int segmentIndex, double *volumePtr)
 Returns the volume of a segment of a wing. More...
 
TiglReturnCode tiglWingGetSpan (TiglCPACSConfigurationHandle cpacsHandle, const char *wingUID, double *pSpan)
 Returns the span of a wing. More...
 
TiglReturnCode tiglWingGetSurfaceArea (TiglCPACSConfigurationHandle cpacsHandle, int wingIndex, double *surfaceAreaPtr)
 Returns the surface area of the wing. Currently, the area includes also the faces on the wing symmetry plane (in case of a symmetric wing). In coming releases, these faces will not belong anymore to the surface area calculation. 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 tiglWingGetVolume (TiglCPACSConfigurationHandle cpacsHandle, int wingIndex, double *volumePtr)
 Returns the volume of the wing. More...
 
TiglReturnCode tiglWingGetWettedArea (TiglCPACSConfigurationHandle cpacsHandle, const char *wingUID, double *wettedAreaPtr)
 Returns the wetted area of the wing. If the wing has no parent (fuselage), it returns the surface area of the wing. 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

Declaration of the TIGL C interface.

Macro Definition Documentation

◆ TIGL_COMMON_EXPORT

#define TIGL_COMMON_EXPORT

◆ TIGL_H

#define TIGL_H

Typedef Documentation

◆ TiglAlgorithmCode

Typedef for possible algorithm types used in calculations.

Possible values for variables of type TiglAlgorithmCode are:

  • TIGL_INTERPOLATE_LINEAR_WIRE: Use a linear interpolation between the points of a wire.
  • TIGL_INTERPOLATE_BSPLINE_WIRE: Use a BSpline interpolation between the points of a wire.
  • TIGL_APPROXIMATE_BSPLINE_WIRE: Use a BSpline approximation for the points of a wire.

◆ TiglAxis

typedef enum TiglAxis TiglAxis

◆ TiglBoolean

typedef enum TiglBoolean TiglBoolean

Definition of boolean type used in TIGL.

Possible values are:

  • TIGL_FALSE
  • TIGL_TRUE

◆ TiglContinuity

◆ TiglControlSurfaceType

◆ TiglCoordinateSystem

◆ TiglCPACSConfigurationHandle

Datatype for a CPACS configuration handle.

◆ TiglGeometricComponentIntent

typedef unsigned long TiglGeometricComponentIntent

◆ TiglGeometricComponentIntentFlags

◆ TiglGeometricComponentType

◆ TiglGetPointBehavior

◆ TiglImportExportFormat

Definition of the different file formats used for import/export used in TIGL.

Possible values are:

  • TIGL_IMPORTEXPORT_IGES: Use IGES format for geometry import/export.
  • TIGL_IMPORTEXPORT_STEP: Use STEP format for geometry import/export.
  • TIGL_IMPORTEXPORT_STL: Use STL format for geometry import/export.
  • TIGL_IMPORTEXPORT_VTK: Use VTK format for geometry import/export.

◆ TiglLoftSide

typedef enum TiglLoftSide TiglLoftSide

◆ TiglLogLevel

typedef enum TiglLogLevel TiglLogLevel

Definition of logging levels.

Possible values are:

  • TILOG_SILENT
  • TILOG_ERROR
  • TILOG_WARNING
  • TILOG_INFO
  • TILOG_DEBUG
  • TILOG_DEBUG1
  • TILOG_DEBUG2
  • TILOG_DEBUG3
  • TILOG_DEBUG4

◆ TiglReturnCode

Definition of error return type.

Possible values are:

  • TIGL_SUCCESS
  • TIGL_ERROR
  • TIGL_NULL_POINTER
  • TIGL_NOT_FOUND
  • TIGL_XML_ERROR
  • TIGL_OPEN_FAILED
  • TIGL_CLOSE_FAILED
  • TIGL_INDEX_ERROR
  • TIGL_STRING_TRUNCATED
  • TIGL_WRONG_TIXI_VERSION
  • TIGL_UID_ERROR

◆ TiglShapeModifier

◆ TiglStringList

typedef const char** TiglStringList

◆ TiglStructureType

◆ TiglSymmetryAxis

Definition of Symmetry Axis used in TIGL.

Possible values are:

  • TIGL_NO_SYMMETRY
  • TIGL_X_Y_PLANE
  • TIGL_X_Z_PLANE
  • TIGL_Y_Z_PLANE
  • TIGL_INHERIT_SYMMETRY

Enumeration Type Documentation

◆ TiglContinuity

Enumerator
C0 
C1 
C2 

◆ TiglControlSurfaceType

Enumerator
TRAILING_EDGE_DEVICE 
LEADING_EDGE_DEVICE 
SPOILER 

◆ TiglCoordinateSystem

Enumerator
GLOBAL_COORDINATE_SYSTEM 
WING_COORDINATE_SYSTEM 
FUSELAGE_COORDINATE_SYSTEM 

◆ TiglGeometricComponentIntentFlags

Enumerator
TIGL_INTENT_PHYSICAL 

A phyisical component like a fuselage, wing, nacelle, something you could touch

TIGL_INTENT_LOGICAL 

A logical component, like a wing segment

TIGL_INTENT_INNER_STRUCTURE 

Part of the aircrafts structure geometry

TIGL_INTENT_OUTER_AERO_SURFACE 

Part of the outer aircraft (wing, fuselage, nacelle)

◆ TiglGetPointBehavior

Options for the behavior of the GetPoint functions.

  • asParameterOnSurface> treats eta-xsi-values as parameters on a surface. This makes sense e.g. for smoothly lofted wings that make heavy use of guide curves.
  • onLinearLoft: eta-xsi-values are coordinates on the chordface for the wing, respectively centerline and relative circumference parameters on the fuselage. The resulting point lies on the linear interpolation of the starting and ending profile of the segment.
Enumerator
asParameterOnSurface 
onLinearLoft 
numGetPointBehaviors 

◆ TiglLoftSide

Enumerator
UPPER_SIDE 
LOWER_SIDE 

◆ TiglShapeModifier

Enumerator
UNMODIFIED_SHAPE 
SHARP_TRAILINGEDGE 
BLUNT_TRAILINGEDGE 

◆ TiglStructureType

Enumerator
UPPER_SHELL 
LOWER_SHELL 
INNER_STRUCTURE 

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.

◆ tiglCloseCPACSConfiguration()

TiglReturnCode tiglCloseCPACSConfiguration ( TiglCPACSConfigurationHandle  cpacsHandle)

Closes a CPACS configuration and cleans up all memory used by the configuration. After closing a configuration the associated configuration handle is no longer valid. When the CPACS configuration has been closed, the companion tixi document can also be closed.

Parameters
[in]cpacsHandleHandle for the CPACS configuration.
Returns
  • TIGL_SUCCESS if successfully opened the CPACS configuration file
  • TIGL_CLOSE_FAILED if closing of the CPACS configuration failed
  • TIGL_NOT_FOUND if handle ist not found in handle container
  • TIGL_ERROR if some other kind of error occurred

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

◆ 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

◆ tiglExportComponent()

TiglReturnCode tiglExportComponent ( TiglCPACSConfigurationHandle  cpacsHandle,
const char *  uid,
const char *  fileName,
double  deflection 
)

Exports a geometric component (e.g. a wing, a fuselage etc.)

The component to be exported is definied via its uid. The export format is specified with the file extension of fileName.

The export can be configured in more detail using tiglSetExportOptions.

Supported file formats are: STEP (*.stp), IGES (*.igs), VTK (*.vtp), Collada (*.dae), STL (*.stl) and BREP (*.brep)

Example: Export a wing to IGES format

tiglExportComponent(handle, "MyWingUID", "wing.igs", 0.);
Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]uidUid of the component to be exported
[in]fileNameFile name of the exported file
[in]deflectionDeflection parameter. This is only used for meshed exports (e.g. VTK, STL, Collada).
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no exporter is found for the specified file name
  • TIGL_NULL_POINTER if uid or fileName is a null pointer
  • TIGL_WRITE_FAILED if the file could not be written
  • TIGL_ERROR if some other error occurred

◆ tiglExportConfiguration()

TiglReturnCode tiglExportConfiguration ( TiglCPACSConfigurationHandle  cpacsHandle,
const char *  fileName,
TiglBoolean  fuseAllShapes,
double  deflection 
)

Exports the whole configuration into a file.

It can be specified, whether the configuration should be exported as a fused geometry (i.e. all shapes are trimmed with each other). The export format is specified with the file extension of fileName.

The export can be configured in more detail using tiglSetExportOptions.

Supported file formats are: STEP (*.stp), IGES (*.igs), VTK (*.vtp), Collada (*.dae), STL (*.stl) and BREP (*.brep)

Example: Export the fused configuration to STEP format

tiglExportConfiguration(handle, "aircraft.stp", TIGL_TRUE, 0.);
Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]fileNameFile name of the exported file
[in]fuseAllShapesWhether to fuse the geometry of not. Fusing can take a lot of time!
[in]deflectionDeflection parameter. This is only used for meshed exports (e.g. VTK, STL, Collada).
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no exporter is found for the specified file name
  • TIGL_NULL_POINTER if fileName is a null pointer
  • TIGL_WRITE_FAILED if the file could not be written
  • TIGL_ERROR if some other error occurred

◆ tiglExportFusedBREP()

TiglReturnCode tiglExportFusedBREP ( TiglCPACSConfigurationHandle  cpacsHandle,
const char *  filename 
)

Exports the fused/trimmed geometry of a CPACS configuration to BREP format.

In order to fuse the geometry, boolean operations are performed. Depending on the complexity of the configuration, the fusing can take several minutes.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]filenameBREP export file name
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no configuration was found for the given handle
  • TIGL_NULL_POINTER if filenamePtr is a null pointer
  • TIGL_ERROR if some other error occurred

◆ tiglExportFusedSTEP()

TiglReturnCode tiglExportFusedSTEP ( TiglCPACSConfigurationHandle  cpacsHandle,
const char *  filenamePtr 
)

Exports the fused/trimmed geometry of a CPACS configuration to STEP format.

In order to fuse the geometry, boolean operations are performed. Depending on the complexity of the configuration, the fusing can take several minutes.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]filenamePtrPointer to an STEP export file name
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no configuration was found for the given handle
  • TIGL_NULL_POINTER if filenamePtr is a null pointer
  • TIGL_ERROR if some other error occurred

◆ tiglExportFusedWingFuselageIGES()

TiglReturnCode tiglExportFusedWingFuselageIGES ( TiglCPACSConfigurationHandle  cpacsHandle,
const char *  filenamePtr 
)

Exports the boolean fused geometry of a CPACS configuration to IGES format.

To maintain compatibility with CATIA, the file suffix should be ".igs".

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]filenamePtrPointer to an IGES export file name
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no configuration was found for the given handle
  • TIGL_NULL_POINTER if filenamePtr is a null pointer
  • TIGL_ERROR if some other error occurred

◆ tiglExportFuselageBREPByUID()

TiglReturnCode tiglExportFuselageBREPByUID ( TiglCPACSConfigurationHandle  cpacsHandle,
const char *  fuselageUID,
const char *  filename 
)

Exports the boolean fused geometry of a fuselage (selected by uid) to BREP format.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]fuselageUIDUID of the Fuselage to export
[in]filenameBREP export file name
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no configuration was found for the given handle
  • TIGL_NULL_POINTER if filenamePtr is a null pointer
  • TIGL_ERROR if some other error occurred

◆ tiglExportFuselageColladaByUID()

TiglReturnCode tiglExportFuselageColladaByUID ( const TiglCPACSConfigurationHandle  cpacsHandle,
const char *  fuselageUID,
const char *  filename,
double  deflection 
)

Exports the boolean fused geometry of a fuselage (selected by uid) meshed to Collada (*.dae) format.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]fuselageUIDUID of the Fuselage to export
[in]filenameFilename of the resulting collada file. It should contain the .dae file name ending.
[in]deflectionMaximum deflection of the triangulation from the real surface
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no configuration was found for the given handle
  • TIGL_NULL_POINTER if filename is a null pointer
  • TIGL_INDEX_ERROR if fuselageUID does not exists
  • TIGL_ERROR if some other error occurred

◆ tiglExportIGES()

TiglReturnCode tiglExportIGES ( TiglCPACSConfigurationHandle  cpacsHandle,
const char *  filenamePtr 
)

Exports the geometry of a CPACS configuration to IGES format.

To maintain compatibility with CATIA, the file suffix should be ".igs".

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]filenamePtrPointer to an IGES export file name
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no configuration was found for the given handle
  • TIGL_NULL_POINTER if filenamePtr is a null pointer
  • TIGL_ERROR if some other error occurred

◆ tiglExportMeshedFuselageSTL()

TiglReturnCode tiglExportMeshedFuselageSTL ( TiglCPACSConfigurationHandle  cpacsHandle,
int  fuselageIndex,
const char *  filenamePtr,
double  deflection 
)

Exports the boolean fused geometry of a fuselage meshed to STL format.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]fuselageIndexIndex of the Fuselage to export
[in]filenamePtrPointer to an STL export file name
[in]deflectionMaximum deflection of the triangulation from the real surface
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no configuration was found for the given handle
  • TIGL_NULL_POINTER if filenamePtr is a null pointer
  • TIGL_INDEX_ERROR if fuselageIndex is less or equal zero
  • TIGL_ERROR if some other error occurred

◆ tiglExportMeshedFuselageSTLByUID()

TiglReturnCode tiglExportMeshedFuselageSTLByUID ( TiglCPACSConfigurationHandle  cpacsHandle,
const char *  fuselageUID,
const char *  filenamePtr,
double  deflection 
)

Exports the boolean fused geometry of a fuselage meshed to STL format.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]fuselageUIDUID of the Fuselage to export
[in]filenamePtrPointer to an STL export file name
[in]deflectionMaximum deflection of the triangulation from the real surface
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no configuration was found for the given handle
  • TIGL_NULL_POINTER if filenamePtr is a null pointer
  • TIGL_INDEX_ERROR if fuselageIndex is less or equal zero
  • TIGL_ERROR if some other error occurred

◆ tiglExportMeshedFuselageVTKByIndex()

TiglReturnCode tiglExportMeshedFuselageVTKByIndex ( const TiglCPACSConfigurationHandle  cpacsHandle,
const int  fuselageIndex,
const char *  filenamePtr,
double  deflection 
)

Exports the boolean fused geometry of a fuselage (selected by index) meshed to VTK format.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]fuselageIndexIndex of the Fuselage to export
[in]filenamePtrPointer to an VTK export file name (*.vtp = polygonal XML_VTK)
[in]deflectionMaximum deflection of the triangulation from the real surface
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no configuration was found for the given handle
  • TIGL_NULL_POINTER if filenamePtr is a null pointer
  • TIGL_INDEX_ERROR if fuselageIndex is less or equal zero
  • TIGL_ERROR if some other error occurred

◆ tiglExportMeshedFuselageVTKByUID()

TiglReturnCode tiglExportMeshedFuselageVTKByUID ( const TiglCPACSConfigurationHandle  cpacsHandle,
const char *  fuselageUID,
const char *  filenamePtr,
double  deflection 
)

Exports the boolean fused geometry of a fuselage (selected by uid) meshed to VTK format.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]fuselageUIDUID of the Fuselage to export
[in]filenamePtrPointer to an VTK export file name (*.vtp = polygonal XML_VTK)
[in]deflectionMaximum deflection of the triangulation from the real surface
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no configuration was found for the given handle
  • TIGL_NULL_POINTER if filenamePtr is a null pointer
  • TIGL_INDEX_ERROR if fuselageUID does not exists
  • TIGL_ERROR if some other error occurred

◆ tiglExportMeshedGeometrySTL()

TiglReturnCode tiglExportMeshedGeometrySTL ( TiglCPACSConfigurationHandle  cpacsHandle,
const char *  filenamePtr,
double  deflection 
)

Exports the boolean fused geometry of the whole configuration meshed to STL format.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]filenamePtrPointer to an STL export file name
[in]deflectionMaximum deflection of the triangulation from the real surface
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no configuration was found for the given handle
  • TIGL_NULL_POINTER if filenamePtr is a null pointer
  • TIGL_ERROR if some other error occurred

◆ tiglExportMeshedGeometryVTK()

TiglReturnCode tiglExportMeshedGeometryVTK ( const TiglCPACSConfigurationHandle  cpacsHandle,
const char *  filenamePtr,
double  deflection 
)

Exports the boolean fused geometry of the whole configuration meshed to VTK format.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]filenamePtrPointer to an VTK export file name (*.vtp = polygonal XML_VTK)
[in]deflectionMaximum deflection of the triangulation from the real surface
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no configuration was found for the given handle
  • TIGL_NULL_POINTER if filenamePtr is a null pointer
  • TIGL_ERROR if some other error occurred

◆ tiglExportMeshedGeometryVTKSimple()

TiglReturnCode tiglExportMeshedGeometryVTKSimple ( const TiglCPACSConfigurationHandle  cpacsHandle,
const char *  filenamePtr,
double  deflection 
)

Exports the boolean fused geometry of the whole configuration meshed to VTK format.

This function does only a very simple, but also very fast meshing on the geometry and exports them to a VTK file. No additional CPACS relevant information are computed.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]filenamePtrPointer to an VTK export file name (*.vtp = polygonal XML_VTK)
[in]deflectionMaximum deflection of the triangulation from the real surface
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no configuration was found for the given handle
  • TIGL_NULL_POINTER if filenamePtr is a null pointer
  • TIGL_ERROR if some other error occurred

◆ tiglExportMeshedWingSTL()

TiglReturnCode tiglExportMeshedWingSTL ( TiglCPACSConfigurationHandle  cpacsHandle,
int  wingIndex,
const char *  filenamePtr,
double  deflection 
)

Exports the boolean fused geometry of a wing meshed to STL format.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]wingIndexIndex of the Wing to export
[in]filenamePtrPointer to an STL export file name
[in]deflectionMaximum deflection of the triangulation from the real surface
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no configuration was found for the given handle
  • TIGL_NULL_POINTER if filenamePtr is a null pointer
  • TIGL_INDEX_ERROR if wingIndex is less or equal zero
  • TIGL_ERROR if some other error occurred

◆ tiglExportMeshedWingSTLByUID()

TiglReturnCode tiglExportMeshedWingSTLByUID ( TiglCPACSConfigurationHandle  cpacsHandle,
const char *  wingUID,
const char *  filenamePtr,
double  deflection 
)

Exports the boolean fused geometry of a wing meshed to STL format.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]wingUIDUID of the Wing to export
[in]filenamePtrPointer to an STL export file name
[in]deflectionMaximum deflection of the triangulation from the real surface
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no configuration was found for the given handle
  • TIGL_NULL_POINTER if filenamePtr is a null pointer
  • TIGL_INDEX_ERROR if wingIndex is less or equal zero
  • TIGL_ERROR if some other error occurred

◆ tiglExportMeshedWingVTKByIndex()

TiglReturnCode tiglExportMeshedWingVTKByIndex ( const TiglCPACSConfigurationHandle  cpacsHandle,
const int  wingIndex,
const char *  filenamePtr,
const double  deflection 
)

Exports the boolean fused geometry of a wing (selected by id) meshed to VTK format.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]wingIndexIndex of the Wing to export
[in]filenamePtrPointer to an VTK export file name (*.vtp = polygonal XML_VTK)
[in]deflectionMaximum deflection of the triangulation from the real surface
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no configuration was found for the given handle
  • TIGL_NULL_POINTER if filenamePtr is a null pointer
  • TIGL_INDEX_ERROR if wingIndex is less or equal zero
  • TIGL_ERROR if some other error occurred

◆ tiglExportMeshedWingVTKByUID()

TiglReturnCode tiglExportMeshedWingVTKByUID ( const TiglCPACSConfigurationHandle  cpacsHandle,
const char *  wingUID,
const char *  filenamePtr,
double  deflection 
)

Exports the boolean fused geometry of a wing (selected by UID) meshed to VTK format.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]wingUIDUID of the Wing to export
[in]filenamePtrPointer to an VTK export file name (*.vtp = polygonal XML_VTK)
[in]deflectionMaximum deflection of the triangulation from the real surface
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no configuration was found for the given handle
  • TIGL_NULL_POINTER if filenamePtr is a null pointer
  • TIGL_INDEX_ERROR if the wing UID does not exists
  • TIGL_ERROR if some other error occurred

◆ tiglExportMeshedWingVTKSimpleByUID()

TiglReturnCode tiglExportMeshedWingVTKSimpleByUID ( const TiglCPACSConfigurationHandle  cpacsHandle,
const char *  wingUID,
const char *  filenamePtr,
double  deflection 
)

Exports the boolean fused geometry of a wing (selected by UID) meshed to VTK format.

This function does only a very simple, but also very fast meshing on the wing segments and exports them to a VTK file. No additional CPACS relevant information are computed.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]wingUIDUID of the Wing to export
[in]filenamePtrPointer to an VTK export file name (*.vtp = polygonal XML_VTK)
[in]deflectionMaximum deflection of the triangulation from the real surface
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no configuration was found for the given handle
  • TIGL_NULL_POINTER if filenamePtr is a null pointer
  • TIGL_INDEX_ERROR if the wing UID does not exists
  • TIGL_ERROR if some other error occurred

◆ tiglExportSTEP()

TiglReturnCode tiglExportSTEP ( TiglCPACSConfigurationHandle  cpacsHandle,
const char *  filenamePtr 
)

Exports the geometry of a CPACS configuration to STEP format.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]filenamePtrPointer to an STEP export file name
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no configuration was found for the given handle
  • TIGL_NULL_POINTER if filenamePtr is a null pointer
  • TIGL_ERROR if some other error occurred

◆ tiglExportWingBREPByUID()

TiglReturnCode tiglExportWingBREPByUID ( TiglCPACSConfigurationHandle  cpacsHandle,
const char *  wingUID,
const char *  filename 
)

Exports the boolean fused geometry of a wing (selected by uid) to BREP format.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]wingUIDUID of the Fuselage to export
[in]filenameBREP export file name
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no configuration was found for the given handle
  • TIGL_NULL_POINTER if filenamePtr is a null pointer
  • TIGL_ERROR if some other error occurred

◆ tiglExportWingColladaByUID()

TiglReturnCode tiglExportWingColladaByUID ( const TiglCPACSConfigurationHandle  cpacsHandle,
const char *  wingUID,
const char *  filename,
double  deflection 
)

Exports the boolean fused geometry of a wing (selected by uid) meshed to Collada (*.dae) format.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]wingUIDUID of the Wing to export
[in]filenameFilename of the resulting collada file. It should contain the .dae file name ending.
[in]deflectionMaximum deflection of the triangulation from the real surface
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no configuration was found for the given handle
  • TIGL_NULL_POINTER if filename is a null pointer
  • TIGL_INDEX_ERROR if fuselageUID does not exists
  • TIGL_ERROR if some other error occurred

◆ tiglFuselageGetCenterLineLength()

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

◆ tiglFuselageGetCircumference()

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

◆ tiglFuselageGetCrossSectionArea()

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

◆ tiglFuselageGetEndConnectedSegmentCount()

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

◆ tiglFuselageGetEndConnectedSegmentIndex()

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

◆ tiglFuselageGetEndSectionAndElementIndex()

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

◆ tiglFuselageGetEndSectionAndElementUID()

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

◆ tiglFuselageGetIndex()

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

◆ tiglFuselageGetMinumumDistanceToGround()

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

◆ tiglFuselageGetNumPointsOnXPlane()

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

◆ tiglFuselageGetNumPointsOnYPlane()

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

◆ tiglFuselageGetPoint()

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

◆ tiglFuselageGetPointAngle()

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.

◆ tiglFuselageGetPointAngleTranslated()

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.

◆ tiglFuselageGetPointOnXPlane()

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

◆ tiglFuselageGetPointOnYPlane()

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

◆ tiglFuselageGetProfileName()

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

◆ tiglFuselageGetSectionCenter()

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

◆ tiglFuselageGetSectionCount()

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

◆ tiglFuselageGetSectionUID()

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

◆ tiglFuselageGetSegmentCount()

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

◆ tiglFuselageGetSegmentIndex()

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

◆ tiglFuselageGetSegmentSurfaceArea()

TiglReturnCode tiglFuselageGetSegmentSurfaceArea ( TiglCPACSConfigurationHandle  cpacsHandle,
int  fuselageIndex,
int  segmentIndex,
double *  surfaceAreaPtr 
)

Returns the surface area of a segment of a fuselage.

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]surfaceAreaPtrThe pointer to a variable for the surface area of the fuselage-segment
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 surfaceAreaPtr is a null pointer
  • TIGL_ERROR if some other error occurred

◆ tiglFuselageGetSegmentUID()

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

◆ tiglFuselageGetSegmentVolume()

TiglReturnCode tiglFuselageGetSegmentVolume ( TiglCPACSConfigurationHandle  cpacsHandle,
int  fuselageIndex,
int  segmentIndex,
double *  volumePtr 
)

Returns the volume of a segment of a fuselage.

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]volumePtrThe pointer to a variable for the volume of the fuselage
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 volumePtr is a null pointer
  • TIGL_ERROR if some other error occurred

◆ tiglFuselageGetStartConnectedSegmentCount()

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

◆ tiglFuselageGetStartConnectedSegmentIndex()

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

◆ tiglFuselageGetStartSectionAndElementIndex()

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

◆ tiglFuselageGetStartSectionAndElementUID()

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

◆ tiglFuselageGetSurfaceArea()

TiglReturnCode tiglFuselageGetSurfaceArea ( TiglCPACSConfigurationHandle  cpacsHandle,
int  fuselageIndex,
double *  surfaceAreaPtr 
)

Returns the surface area of the fuselage. Currently, the area includes also the faces on the fuselage symmetry plane (in case of a symmetric wing). This is in particular a problem for fuselages, where only one half side is defined in CPACS. In future releases, these faces will not belong anymore to the surface area calculation.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]fuselageIndexIndex of the Fuselage to calculate the area, starting at 1
[out]surfaceAreaPtrThe surface area of the wing
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

◆ tiglFuselageGetSymmetry()

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

◆ tiglFuselageGetUID()

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

◆ tiglFuselageGetVolume()

TiglReturnCode tiglFuselageGetVolume ( TiglCPACSConfigurationHandle  cpacsHandle,
int  fuselageIndex,
double *  volumePtr 
)

Returns the volume of the fuselage.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]fuselageIndexIndex of the fuselage to calculate the volume, starting at 1
[out]volumePtrThe volume of the fuselage
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

◆ tiglFuselageSetGetPointBehavior()

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

◆ 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

◆ tiglGetCPACSTixiHandle()

TiglReturnCode tiglGetCPACSTixiHandle ( TiglCPACSConfigurationHandle  cpacsHandle,
TixiDocumentHandle *  tixiHandlePtr 
)

Returns the underlying TixiDocumentHandle for a given CPACS configuration handle.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[out]tixiHandlePtrHandle for the TIXI document associated with the CPACS configuration
Returns
  • TIGL_SUCCESS if the TIXI handle was found
  • TIGL_NOT_FOUND if the TIXI handle was not found
  • TIGL_NULL_POINTER if tixiHandlePtr is an invalid null pointer
  • TIGL_ERROR if some other kind of error occurred

◆ tiglGetCurveIntersection()

TiglReturnCode tiglGetCurveIntersection ( TiglCPACSConfigurationHandle  cpacsHandle,
const char *  curvesID1,
int  curve1Idx,
const char *  curvesID2,
int  curve2Idx,
double  tolerance,
char **  intersectionID 
)

tiglGetCurveIntersection computes intersection point of two (intersection) curves. Both curves are the result of a previous intersection (e.g. Fuselage-Wing Intersection).

The curves must be specified by their intersectionIDs and an index of the wire in the intersection. For each calculated intersection, the distance between the point on the first curve to the point on the second curve is smaller than the tolerance specified by the user.

It returns an intersection ID for further computations on the result. To query the number of intersection points, call tiglGetCurveIntersectionCount. To query intersection points, tiglGetCurveIntersectionPoint or tiglGetCurveParameter has to be called.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]curvesID1ID of the first intersection
[in]curve1IdxIndex of the curve in the first intersection
[in]curvesID2ID of the second intersection
[in]curve2IdxIndex of the curve in the second intersection
[in]tolerancetolerance to specify the required accuracy of the intersection point
[out]intersectionIDA unique identifier that is associated with the computed intersection.
Returns
  • TIGL_SUCCESS if an intersection could be computed
  • TIGL_NOT_FOUND if the cpacs handle is not valid
  • TIGL_NULL_POINTER if either curveID or the intersectionID is a NULL pointer
  • TIGL_INDEX_ERROR if either curve index is invalid
  • TIGL_MATH_ERROR if the tolerance is not positive
  • TIGL_ERROR if some other error occurred

◆ tiglGetCurveIntersectionCount()

TiglReturnCode tiglGetCurveIntersectionCount ( TiglCPACSConfigurationHandle  cpacsHandle,
const char *  intersectionID,
int *  pointCount 
)

tiglGetCurveIntersectionCount returns the number of intersection points computed by tiglGetCurveIntersection for the given intersectionID.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]intersectionIDThe intersection identifier returned by tiglGetCurveIntersection
[out]pointCountNumber of intersection points computed by tiglGetCurveIntersection If no intersection could be computed, pointCount is 0.
Returns
  • TIGL_SUCCESS if no error occured
  • TIGL_NOT_FOUND if the cpacs handle is not valid
  • TIGL_NULL_POINTER if either intersectionID or pointCount is a NULL pointer

◆ tiglGetCurveIntersectionPoint()

TiglReturnCode tiglGetCurveIntersectionPoint ( TiglCPACSConfigurationHandle  cpacsHandle,
const char *  intersectionID,
int  pointIdx,
double *  pointX,
double *  pointY,
double *  pointZ 
)

tiglGetCurveIntersectionPoint returns an intersection point calculated by tiglGetCurveIntersection

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]intersectionIDThe intersection identifier returned by tiglGetCurveIntersection
[in]pointIdxIndex of the intersection point. To get the number of intersection points, call tiglGetCurveIntersectionCount with 1 <= pointIdx <= pointCount.
[out]pointXX coordinate of the resulting point.
[out]pointYY coordinate of the resulting point.
[out]pointZZ coordinate of the resulting point.
Returns
  • TIGL_SUCCESS if no error occured
  • TIGL_NOT_FOUND if the cpacs handle is not valid
  • TIGL_NULL_POINTER if pointX, pointY, or pointZ or the intersectionID are NULL pointers
  • TIGL_INDEX_ERROR if pointIdx is not in valid range

◆ tiglGetCurveParameter()

TiglReturnCode tiglGetCurveParameter ( TiglCPACSConfigurationHandle  cpacsHandle,
const char *  curveID,
int  curveIdx,
double  pointX,
double  pointY,
double  pointZ,
double *  eta 
)

tiglGetCurveParameter projects a point onto a curve of an intersection line. The intersection line is specified by a curveID. The curveID can be calculated using tiglIntersectComponents, tiglIntersectWithPlane or tiglIntersectWithPlaneSegment. The function returns the parameter eta of the projected point on the curve.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]curveIDThe id of the intersection line.
[in]curveIdxThe index of curve in the intersection.
[in]pointXX coordinate of the point to be projected.
[in]pointYY coordinate of the point to be projected.
[in]pointZZ coordinate of the point to be projected.
[out]etaThe parameter along the first curve.
Returns
  • TIGL_SUCCESS if no error occured
  • TIGL_NOT_FOUND if the cpacs handle is not valid
  • TIGL_NULL_POINTER if intersectionID, curveID or eta are NULL pointers
  • TIGL_INDEX_ERROR if curveIdx is not in valid range

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

◆ tiglGetFuselageCount()

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

◆ tiglGetRotorCount()

TiglReturnCode tiglGetRotorCount ( TiglCPACSConfigurationHandle  cpacsHandle,
int *  rotorCountPtr 
)

Returns the number of rotors in a CPACS configuration.

Fortran syntax:

tigl_get_rotor_count(integer cpacsHandle, integer rotorCountPtr, integer returnCode)

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

◆ tiglGetVersion()

const char* tiglGetVersion ( )

Returns the version number of this TIGL version.

Returns
  • char* A string with the version number.

◆ 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

◆ tiglIntersectComponents()

TiglReturnCode tiglIntersectComponents ( TiglCPACSConfigurationHandle  cpacsHandle,
const char *  componentUidOne,
const char *  componentUidTwo,
char **  intersectionID 
)

tiglIntersectComponents computes the intersection line(s) between two shapes specified by their CPACS uid. It returns an intersection ID for further computations on the result. To query points on the intersection line, tiglIntersectGetPoint has to be called.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]componentUidOneThe UID of the first component
[in]componentUidTwoThe UID of the second component
[out]intersectionIDA unique identifier that is associated with the computed intersection.
Returns
  • TIGL_SUCCESS if an intersection could be computed
  • TIGL_NOT_FOUND if the cpacs handle is not valid
  • TIGL_NULL_POINTER if either componentUidOne, componentUidTwo, or intersectionID are NULL pointers
  • TIGL_UID_ERROR if componentUidOne or componentUidTwo can not be found in the CPACS file

◆ tiglIntersectGetLineCount()

TiglReturnCode tiglIntersectGetLineCount ( TiglCPACSConfigurationHandle  cpacsHandle,
const char *  intersectionID,
int *  lineCount 
)

tiglIntersectGetLineCount returns the number of intersection lines computed by tiglIntersectComponents, tiglIntersectWithPlane or tiglIntersectWithPlaneSegment for the given intersectionID.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]intersectionIDThe intersection identifier returned by tiglIntersectComponents or tiglIntersectWithPlane
[out]lineCountNumber of intersection lines computed by tiglIntersectComponents or tiglIntersectWithPlane. If no intersection could be computed, line count is 0.
Returns
  • TIGL_SUCCESS if no error occured
  • TIGL_NOT_FOUND if the cpacs handle or the intersectionID is not valid
  • TIGL_NULL_POINTER if lineCount is a NULL pointer

◆ tiglIntersectGetPoint()

TiglReturnCode tiglIntersectGetPoint ( TiglCPACSConfigurationHandle  cpacsHandle,
const char *  intersectionID,
int  lineIdx,
double  eta,
double *  pointX,
double *  pointY,
double *  pointZ 
)

tiglIntersectGetPoint samples a point on an intersection line calculated by tiglIntersectComponents, tiglIntersectWithPlane or tiglIntersectWithPlaneSegment.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]intersectionIDThe intersection identifier returned by tiglIntersectComponents or tiglIntersectWithPlane
[in]lineIdxLine index to sample from. To get the number of lines, call tiglIntersectGetLineCount. 1 <= lineIdx <= lineCount.
[in]etaParameter on the curve that determines the point position, with 0 <= eta <= 1.
[out]pointXX coordinate of the resulting point.
[out]pointYY coordinate of the resulting point.
[out]pointZZ coordinate of the resulting point.
Returns
  • TIGL_SUCCESS if no error occured
  • TIGL_NOT_FOUND if the cpacs handle or the intersectionID is not valid
  • TIGL_NULL_POINTER if pointX, pointY, or pointZ are NULL pointers
  • TIGL_INDEX_ERROR if lineIdx is not in valid range
  • TIGL_MATH_ERROR if eta is not in range 0 <= eta <= 1

◆ tiglIntersectWithPlane()

TiglReturnCode tiglIntersectWithPlane ( TiglCPACSConfigurationHandle  cpacsHandle,
const char *  componentUid,
double  px,
double  py,
double  pz,
double  nx,
double  ny,
double  nz,
char **  intersectionID 
)

tiglIntersectWithPlane computes the intersection line(s) between a shape and a plane. It returns an intersection ID for further computations on the result. To query points on the intersection line, tiglIntersectGetPoint has to be called.

The shape has to be specified by its CPACS UID. The plane is specified by a central point p on the plane and a normal vector n, which is perpendicular to the plane. The normal vector must not be zero!

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]componentUidThe UID of the CPACS shape
[in]pxX Coordinate of the plane center point
[in]pyY Coordinate of the plane center point
[in]pzZ Coordinate of the plane center point
[in]nxX value of the plane normal vector
[in]nyY value of the plane normal vector
[in]nzZ value of the plane normal vector
[out]intersectionIDA unique identifier that is associated with the computed intersection.
Returns
  • TIGL_SUCCESS if an intersection could be computed
  • TIGL_NOT_FOUND if the cpacs handle is not valid
  • TIGL_NULL_POINTER if either componentUid or intersectionID are NULL pointers
  • TIGL_UID_ERROR if componentUid can not be found in the CPACS file
  • TIGL_MATH_ERROR if the normal vector is zero

◆ tiglIntersectWithPlaneSegment()

TiglReturnCode tiglIntersectWithPlaneSegment ( TiglCPACSConfigurationHandle  cpacsHandle,
const char *  componentUid,
double  p1x,
double  p1y,
double  p1z,
double  p2x,
double  p2y,
double  p2z,
double  wx,
double  wy,
double  wz,
char **  intersectionID 
)

tiglIntersectWithPlaneSegment computes the intersection line(s) between a shape and a plane segment. The plane segment is defined by p(u,v) = P1*(1-u) + P2*u + w*v, with u in [0,1] (see image).

The dashed line connecting the points P1 and P2 is projected along w onto the shape (blue dashed line).

It returns an intersection ID for further computations on the result. To query points on the intersection line, tiglIntersectGetPoint has to be called.

The shape has to be specified by its CPACS UID. The plane segment is specified by two points p1 and p2 and a normal vector w, which (ideally) is perpendicular to (p2 - p1). The normal vector w must not be zero!

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]componentUidThe UID of the CPACS shape
[in]p1xX Coordinate of the first point P1
[in]p1yY Coordinate of the first point P1
[in]p1zZ Coordinate of the first point P1
[in]p2xX Coordinate of the second point P2
[in]p2yY Coordinate of the second point P2
[in]p2zZ Coordinate of the second point P2
[in]wxX value of the normal vector w
[in]wyY value of the normal vector w
[in]wzZ value of the normal vector w
[out]intersectionIDA unique identifier that is associated with the computed intersection.
Returns
  • TIGL_SUCCESS if an intersection could be computed
  • TIGL_NOT_FOUND if the cpacs handle is not valid
  • TIGL_NULL_POINTER if either componentUid or intersectionID are NULL pointers
  • TIGL_UID_ERROR if componentUid can not be found in the CPACS file
  • TIGL_MATH_ERROR if the normal vector is zero, p1 and p2 are equal or if w and (p2-p1) are linearly dependent.

◆ tiglIsCPACSConfigurationHandleValid()

TiglReturnCode tiglIsCPACSConfigurationHandleValid ( TiglCPACSConfigurationHandle  cpacsHandle,
TiglBoolean isValidPtr 
)

Checks if a given CPACS configuration handle is a valid.

Parameters
[in]cpacsHandleCPACS configuration handle to check
[out]isValidPtrContains TIGL_TRUE, if handle is valid, otherwise contains TIGL_FALSE
Returns
  • TIGL_SUCCESS if no error occurred

◆ tiglLogSetFileEnding()

TiglReturnCode tiglLogSetFileEnding ( const char *  ending)

Sets the file ending for logging files. Default is "log".

This function has to be called before tiglLogToFileEnabled to have the desired effect.

Parameters
[in]endingFile ending of the logging file. Default is "log".
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NULL_POINTER if ending is NULL
  • TIGL_ERROR if some error occurred

◆ tiglLogSetTimeInFilenameEnabled()

TiglReturnCode tiglLogSetTimeInFilenameEnabled ( TiglBoolean  enabled)

Enables or disables appending a unique date/time identifier inside the log file name (behind the file prefix). By default, the time identifier is enabled.

This function has to be called before tiglLogToFileEnabled to have the desired effect.

Parameters
[in]enabledSet to true, if time identifier should be enabled.
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_ERROR if some error occurred

◆ tiglLogSetVerbosity()

TiglReturnCode tiglLogSetVerbosity ( TiglLogLevel  level)

Set the console verbosity level.

This function shall be used change, what kind of logging information is displayed on the console. By default, only errors and warnings are printed on console.

Parameters
[in]levelVerbosity level for console messages.
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_ERROR if some error occurred

◆ tiglLogToFileDisabled()

TiglReturnCode tiglLogToFileDisabled ( )

Disabled file logging. If a log file is currently opened by TiGL it will be closed. The log messages are printed to console. This is the default logging mechanism of TIGL.

Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_ERROR if some other error occurred

◆ tiglLogToFileEnabled()

TiglReturnCode tiglLogToFileEnabled ( const char *  filePrefix)

Sets up the tigl logging mechanism to send all log messages into a file.

Typically this function has to be called before opening any cpacs configuration. The console logging mechanism remains untouched.

Parameters
[in]filePrefixPrefix of the filename to be created. The filename consists of the prefix, a date and time string and the ending ".log".
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NULL_POINTER if filePrefix is NULL
  • TIGL_OPEN_FAILED if file can not be opened for writing
  • TIGL_ERROR if some other error occurred

◆ tiglLogToFileStreamEnabled()

TiglReturnCode tiglLogToFileStreamEnabled ( FILE *  fp)

Sets up the tigl logging mechanism to send all log messages into an already opened file.

In contrast to tiglLogToFileEnabled, the messages are appended to an already opened file. This file might be an already opened logging file set up by another library or program. The console logging mechanism remains untouched.

Typically this function has to be called before opening any cpacs configuration.

Parameters
[in]fpFile pointer to an already opened file.
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NULL_POINTER if fp is NULL , i.e. not opened for writing.
  • TIGL_ERROR if some other error occurred

◆ tiglOpenCPACSConfiguration()

TiglReturnCode tiglOpenCPACSConfiguration ( TixiDocumentHandle  tixiHandle,
const char *  configurationUID,
TiglCPACSConfigurationHandle cpacsHandlePtr 
)

Opens a CPACS configuration and builds up the data and geometry structure in memory.

Parameters
[in]tixiHandleHandle to a TIXI document. The TIXI document should not be closed until the CPACS configuration is closed. First close the CPACS configuration, then the TIXI document.
[in]configurationUIDThe UID of the configuration that should be loaded by TIGL. Could be NULL or an empty string if the data set contains only one configuration.
[out]cpacsHandlePtrHandle to the CPACS configuration. This handle is used in calls to other TIGL functions.
Returns
  • TIGL_SUCCESS if successfully opened the CPACS configuration
  • TIGL_XML_ERROR if file is not well-formed or another XML error occurred
  • TIGL_OPEN_FAILED if some other error occurred
  • TIGL_NULL_POINTER if cpacsHandlePtr is an invalid null pointer
  • TIGL_ERROR if some other kind of error occurred
  • TIGL_INVALID_UID is the UID does not exist or an error orrcured with this configuration

◆ tiglProfileGetBSplineCount()

TiglReturnCode tiglProfileGetBSplineCount ( TiglCPACSConfigurationHandle  cpacsHandle,
const char *  profileUID,
int *  curveCount 
)

Returns the number of curves the given profile is made of.

The given profile may be a fuselage profile or a wing profile. Typically, wing profiles consist of two curves (lower and upper curve), fuselage profiles consist of only one curve.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]profileUIDUID of the profile
[out]curveCountNumber of curves
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no configuration was found for the given handle
  • TIGL_UID_ERROR if profileUID is wrong
  • TIGL_NULL_POINTER if profileUID or curveCount NULL
  • TIGL_ERROR if some other error occurred

◆ tiglProfileGetBSplineData()

TiglReturnCode tiglProfileGetBSplineData ( TiglCPACSConfigurationHandle  cpacsHandle,
const char *  profileUID,
int  curveid,
int  nControlPoints,
double *  cpx,
double *  cpy,
double *  cpz,
int  nKnots,
double *  knots 
)

Returns the B-Spline data of the given profile curve. This includes the knot vector and the control points of the B-Spline.

The output arrays cpx, cpy, cpz, and knots have to be allocated by the user first. The control point vector arrays must have the size nControlPoints. This value must be queried with tiglProfileGetBSplineDataSizes first. The knot vector array must have the size kKnots. This value has to be queried also using the function tiglProfileGetBSplineDataSizes.

The given profile may be a fuselage profile or a wing profile. Typically, wing profiles consist of two curves (lower and upper curve), fuselage profiles consist of only one curve.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]profileUIDUID of the profile
[in]curveidIndex of the curve. Number of curves must be queried with tiglProfileGetBSplineCount. 1 <= index <= count
[in]nControlPointsSize of the control point vector. To be queried with tiglProfileGetBSplineDataSizes first.
[out]cpxX-values of the control point vector.
[out]cpyY-values of the control point vector.
[out]cpzZ-values of the control point vector.
[in]nKnotsSize of the knot vector. To be queried with tiglProfileGetBSplineDataSizes first.
[out]knotsKnot vector values.
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no configuration was found for the given handle
  • TIGL_UID_ERROR if profileUID is wrong
  • TIGL_INDEX_ERROR if curveid knot in range [1, curveCount]
  • TIGL_NULL_POINTER if the argument profileUID, cpx, cpy, cpz, or knots are NULL
  • TIGL_ERROR if the values nControlPoints, or nKnots are wrong

◆ tiglProfileGetBSplineDataSizes()

TiglReturnCode tiglProfileGetBSplineDataSizes ( TiglCPACSConfigurationHandle  cpacsHandle,
const char *  profileUID,
int  curveid,
int *  degree,
int *  nControlPoints,
int *  nKnots 
)

Returns the B-Spline data sizes for a given curve on a profile. This includes size of the knot vector, size of the control point vector and degree of the spline.

The given profile may be a fuselage profile or a wing profile. Typically, wing profiles consist of two curves (lower and upper curve), fuselage profiles consist of only one curve.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]profileUIDUID of the profile
[in]curveidIndex of the curve. Number of curves must be queried with tiglProfileGetBSplineCount. 1 <= index <= count
[out]degreeDegree of the B-Spline
[out]nControlPointsSize of the control point vector
[out]nKnotsSize of the knot vector
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no configuration was found for the given handle
  • TIGL_UID_ERROR if profileUID is wrong
  • TIGL_INDEX_ERROR if curveid knot in range [1, curveCount]
  • TIGL_NULL_POINTER if the argument profileUID, degree, ncontrolPoints, or nKnots are NULL
  • TIGL_ERROR if some other error occurred

◆ tiglRotorBladeGetAzimuthAngle()

TiglReturnCode tiglRotorBladeGetAzimuthAngle ( TiglCPACSConfigurationHandle  cpacsHandle,
int  rotorIndex,
int  rotorBladeIndex,
double *  azimuthAnglePtr 
)

Returns the azimuth angle of a rotor blade in degrees.

Returns the azimuth angle in degrees of the rotor blade with the index rotorBladeIndex attached to the rotor with the index rotorIndex.

Fortran syntax:

tigl_get_rotor_blade_azimuth(integer cpacsHandle, integer rotorIndex, integer rotorBladeIndex, real azimuthAngle, integer returnCode)

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]rotorIndexIndex of the rotor
[in]rotorBladeIndexIndex of the rotor blade
[out]azimuthAnglePtrPointer to the azimuth angle
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no configuration was found for the given handle
  • TIGL_INDEX_ERROR if rotorIndex or rotorBladeIndex are invalid
  • TIGL_NULL_POINTER if azimuthAnglePtr is a null pointer
  • TIGL_ERROR if some other error occurred

◆ tiglRotorBladeGetLocalChord()

TiglReturnCode tiglRotorBladeGetLocalChord ( TiglCPACSConfigurationHandle  cpacsHandle,
int  rotorIndex,
int  rotorBladeIndex,
int  segmentIndex,
double  eta,
double *  chordPtr 
)

Returns the local chord length of a rotor blade.

Returns the local chord length of the section at the relative spanwise coordinate eta of the segment segmentIndex of the rotor blade with the index rotorBladeIndex attached to the rotor with the index rotorIndex.

Fortran syntax:

tigl_get_rotor_blade_local_chord(integer cpacsHandle, integer rotorIndex, integer rotorBladeIndex, integer segmentIndex, real eta, real chordPtr, integer returnCode)

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]rotorIndexIndex of the rotor
[in]rotorBladeIndexIndex of the rotor blade
[in]segmentIndexIndex of the segment of the referenced wing definition
[in]etaRelative spanwise segment coordinate: eta in the range 0.0 <= eta <= 1.0; eta = 0 for inner section , eta = 1 for outer section
[out]chordPtrPointer to the local chord length
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no configuration was found for the given handle or no point was found
  • TIGL_INDEX_ERROR if rotorIndex, rotorBladeIndex or segmentIndex are invalid
  • TIGL_NULL_POINTER if chordPtr is a null pointer
  • TIGL_ERROR if some other error occurred

◆ tiglRotorBladeGetLocalRadius()

TiglReturnCode tiglRotorBladeGetLocalRadius ( TiglCPACSConfigurationHandle  cpacsHandle,
int  rotorIndex,
int  rotorBladeIndex,
int  segmentIndex,
double  eta,
double *  radiusPtr 
)

Returns the local radius of a rotor blade.

Returns the local radius of the rotor blade with the index rotorBladeIndex attached to the rotor with the index rotorIndex. The distance of the point with relative spanwise coordinate eta on the quarter chord line of the rotor blade segment segmentIndex from the z axis of the rotor coordinate system is taken as the local radius. It is calculated for the rotor blade at azimuth=0 and with no hinge transformations applied.

Fortran syntax:

tigl_get_rotor_blade_local_radius(integer cpacsHandle, integer rotorIndex, integer rotorBladeIndex, integer segmentIndex, real eta, real radiusPtr, integer returnCode)

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]rotorIndexIndex of the rotor
[in]rotorBladeIndexIndex of the rotor blade
[in]segmentIndexIndex of the segment of the referenced wing definition
[in]etaRelative spanwise segment coordinate: eta in the range 0.0 <= eta <= 1.0; eta = 0 for inner section , eta = 1 for outer section
[out]radiusPtrPointer to the local radius
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no configuration was found for the given handle or no point was found
  • TIGL_INDEX_ERROR if rotorIndex, rotorBladeIndex or segmentIndex are invalid
  • TIGL_NULL_POINTER if radiusPtr is a null pointer
  • TIGL_ERROR if some other error occurred

◆ tiglRotorBladeGetLocalTwistAngle()

TiglReturnCode tiglRotorBladeGetLocalTwistAngle ( TiglCPACSConfigurationHandle  cpacsHandle,
int  rotorIndex,
int  rotorBladeIndex,
int  segmentIndex,
double  eta,
double *  twistAnglePtr 
)

Returns the local twist angle [deg] of a rotor blade.

Returns the twist angle in degrees of the section at the relative spanwise coordinate eta of the segment segmentIndex of the rotor blade with the index rotorBladeIndex attached to the rotor with the index rotorIndex.

Fortran syntax:

tigl_get_rotor_blade_local_twist_angle(integer cpacsHandle, integer rotorIndex, integer rotorBladeIndex, integer segmentIndex, real eta, real twistAnglePtr, integer returnCode)

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]rotorIndexIndex of the rotor
[in]rotorBladeIndexIndex of the rotor blade
[in]segmentIndexIndex of the segment of the referenced wing definition
[in]etaRelative spanwise segment coordinate: eta in the range 0.0 <= eta <= 1.0; eta = 0 for inner section , eta = 1 for outer section
[out]twistAnglePtrPointer to the local twist angle
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no configuration was found for the given handle or no point was found
  • TIGL_INDEX_ERROR if rotorIndex, rotorBladeIndex or segmentIndex are invalid
  • TIGL_NULL_POINTER if twistAnglePtr is a null pointer
  • TIGL_ERROR if some other error occurred

◆ tiglRotorBladeGetPlanformArea()

TiglReturnCode tiglRotorBladeGetPlanformArea ( TiglCPACSConfigurationHandle  cpacsHandle,
int  rotorIndex,
int  rotorBladeIndex,
double *  planformAreaPtr 
)

Returns the planform area of the rotor blade.

Fortran syntax:

tigl_rotor_blade_get_planform_area(integer cpacsHandle, int rotorIndex, int rotorBladeIndex, real planformAreaPtr, integer returnCode)

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]rotorIndexIndex of the rotor
[in]rotorBladeIndexIndex of the rotor blade to calculate the area, starting at 1
[out]planformAreaPtrThe planform area of the rotor blade
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no configuration was found for the given handle
  • TIGL_INDEX_ERROR if rotorIndex or rotorBladeIndex are invalid
  • TIGL_NULL_POINTER if planformAreaPtr is a null pointer
  • TIGL_ERROR if some other error occurred

◆ tiglRotorBladeGetRadius()

TiglReturnCode tiglRotorBladeGetRadius ( TiglCPACSConfigurationHandle  cpacsHandle,
int  rotorIndex,
int  rotorBladeIndex,
double *  radiusPtr 
)

Returns the radius of a rotor blade.

Returns the radius of the rotor blade with the index rotorBladeIndex attached to the rotor with the index rotorIndex. The maximum distance of a point on the quarter chord line of the rotor blade from the z axis of the rotor coordinate system is taken as the rotor blade radius. It is calculated for the rotor blade at azimuth=0 and with no hinge transformations applied.

Fortran syntax:

tigl_get_rotor_blade_radius(integer cpacsHandle, integer rotorIndex, integer rotorBladeIndex, real radiusPtr, integer returnCode)

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]rotorIndexIndex of the rotor
[in]rotorBladeIndexIndex of the rotor blade
[out]radiusPtrPointer to the radius
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no configuration was found for the given handle
  • TIGL_INDEX_ERROR if rotorIndex or rotorBladeIndex are invalid
  • TIGL_NULL_POINTER if radiusPtr is a null pointer
  • TIGL_ERROR if some other error occurred

◆ tiglRotorBladeGetSurfaceArea()

TiglReturnCode tiglRotorBladeGetSurfaceArea ( TiglCPACSConfigurationHandle  cpacsHandle,
int  rotorIndex,
int  rotorBladeIndex,
double *  surfaceAreaPtr 
)

Returns the surface area of the rotor blade.

Fortran syntax:

tigl_rotor_blade_get_surface_area(integer cpacsHandle, int rotorIndex, int rotorBladeIndex, real surfaceAreaPtr, integer returnCode)

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]rotorIndexIndex of the rotor
[in]rotorBladeIndexIndex of the rotor blade to calculate the area, starting at 1
[out]surfaceAreaPtrThe surface area of the rotor blade
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no configuration was found for the given handle
  • TIGL_INDEX_ERROR if rotorIndex or rotorBladeIndex are invalid
  • TIGL_NULL_POINTER if surfaceAreaPtr is a null pointer
  • TIGL_ERROR if some other error occurred

◆ tiglRotorBladeGetTipSpeed()

TiglReturnCode tiglRotorBladeGetTipSpeed ( TiglCPACSConfigurationHandle  cpacsHandle,
int  rotorIndex,
int  rotorBladeIndex,
double *  tipSpeedPtr 
)

Returns the tip speed of a rotor blade [m/s].

The rotor blade tip speed is calculated using the nominal rotation speed of the rotor and the rotor blade radius.

Fortran syntax:

tigl_get_rotor_blade_tip_speed(integer cpacsHandle, integer rotorIndex, integer rotorBladeIndex, real tipSpeedPtr, integer returnCode)

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]rotorIndexIndex of the rotor
[in]rotorBladeIndexIndex of the rotor blade
[out]tipSpeedPtrPointer to the radius
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no configuration was found for the given handle
  • TIGL_INDEX_ERROR if rotorIndex or rotorBladeIndex are invalid
  • TIGL_NULL_POINTER if tipSpeedPtr is a null pointer
  • TIGL_ERROR if some other error occurred

◆ tiglRotorBladeGetVolume()

TiglReturnCode tiglRotorBladeGetVolume ( TiglCPACSConfigurationHandle  cpacsHandle,
int  rotorIndex,
int  rotorBladeIndex,
double *  volumePtr 
)

Returns the volume of the rotor blade.

Fortran syntax:

tigl_rotor_blade_get_volume(integer cpacsHandle, int rotorIndex, int rotorBladeIndex, real volumePtr, integer returnCode)

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]rotorIndexIndex of the rotor
[in]rotorBladeIndexIndex of the rotor blade to calculate the volume, starting at 1
[out]volumePtrThe volume of the rotor blade
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no configuration was found for the given handle
  • TIGL_INDEX_ERROR if rotorIndex or rotorBladeIndex are invalid
  • TIGL_NULL_POINTER if volumePtr is a null pointer
  • TIGL_ERROR if some other error occurred

◆ tiglRotorBladeGetWingIndex()

TiglReturnCode tiglRotorBladeGetWingIndex ( TiglCPACSConfigurationHandle  cpacsHandle,
int  rotorIndex,
int  rotorBladeIndex,
int *  wingIndexPtr 
)

Returns the index of the parent wing definition of a rotor blade.

Returns the index of the wing definition referenced by the parent rotor blade attachment of the rotor blade with the index rotorBladeIndex.

Fortran syntax:

tigl_get_rotor_blade_wing_index(integer cpacsHandle, integer rotorIndex, integer rotorBladeIndex, integer wingIndexPtr, integer returnCode)

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]rotorIndexIndex of the rotor
[in]rotorBladeIndexIndex of the rotor blade
[out]wingIndexPtrPointer to the wing index
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no configuration was found for the given handle
  • TIGL_INDEX_ERROR if rotorIndex or rotorBladeIndex are invalid
  • TIGL_NULL_POINTER if wingIndexPtr is a null pointer
  • TIGL_ERROR if some other error occurred

◆ tiglRotorBladeGetWingUID()

TiglReturnCode tiglRotorBladeGetWingUID ( TiglCPACSConfigurationHandle  cpacsHandle,
int  rotorIndex,
int  rotorBladeIndex,
char **  wingUIDPtr 
)

Returns the UID of the parent wing definition of a rotor blade.

Returns the UID of the wing definition referenced by the parent rotor blade attachment of the rotor blade with the index rotorBladeIndex.

Fortran syntax:

tigl_get_rotor_blade_wing_uid(integer cpacsHandle, integer rotorIndex, integer rotorBladeIndex, character*n wingUIDPtr, integer returnCode)

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]rotorIndexIndex of the rotor
[in]rotorBladeIndexIndex of the rotor blade
[out]wingUIDPtrPointer to the wing index
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no configuration was found for the given handle
  • TIGL_INDEX_ERROR if rotorIndex or rotorBladeIndex are invalid
  • TIGL_NULL_POINTER if wingUIDPtr is a null pointer
  • TIGL_ERROR if some other error occurred

◆ tiglRotorGetIndex()

TiglReturnCode tiglRotorGetIndex ( TiglCPACSConfigurationHandle  cpacsHandle,
const char *  rotorUID,
int *  rotorIndexPtr 
)

Returns the Index of a rotor.

Fortran syntax:

tigl_rotor_get_index(integer cpacsHandle, character*n uIDNamePtr, integer rotorIndex, integer returnCode)

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]rotorUIDThe uid of the rotor
[out]rotorIndexPtrThe index of a rotor, starting at 1

Usage example:

   TiglReturnCode returnCode;
   int rotorIndex;
   returnCode = tiglRotorGetUID(cpacsHandle, rotorUID, &rotorIndex);
   printf("The Index of the rotor is %d\n", rotorIndex);
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no configuration was found for the given handle
  • TIGL_UID_ERROR if rotorUID does not exist
  • TIGL_NULL_POINTER if rotorUID is a null pointer
  • TIGL_ERROR if some other error occurred

◆ tiglRotorGetRadius()

TiglReturnCode tiglRotorGetRadius ( TiglCPACSConfigurationHandle  cpacsHandle,
int  rotorIndex,
double *  radiusPtr 
)

Returns the radius of the rotor.

This function returns the radius of the largest blade attached to the rotor hub.

Fortran syntax:

tigl_rotor_get_radius(integer cpacsHandle, int rotorIndex, real radiusPtr, integer returnCode)

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]rotorIndexIndex of the rotor to calculate the radius, starting at 1
[out]radiusPtrThe radius of the rotor
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no configuration was found for the given handle
  • TIGL_INDEX_ERROR if rotorIndex is less or equal zero or greater than the rotor count
  • TIGL_NULL_POINTER if radiusPtr is a null pointer
  • TIGL_ERROR if some other error occurred

◆ tiglRotorGetReferenceArea()

TiglReturnCode tiglRotorGetReferenceArea ( TiglCPACSConfigurationHandle  cpacsHandle,
int  rotorIndex,
double *  referenceAreaPtr 
)

Returns the reference area of the rotor.

The area of the rotor disk is taken as reference area of the rotor. It is calculated using the formula pi*r^2, where r denotes the radius of the largest attached blade.

Fortran syntax:

tigl_rotor_get_reference_area(integer cpacsHandle, int rotorIndex, real referenceAreaPtr, integer returnCode)

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]rotorIndexIndex of the rotor to calculate the area, starting at 1
[out]referenceAreaPtrThe reference area of the rotor
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no configuration was found for the given handle
  • TIGL_INDEX_ERROR if rotorIndex is less or equal zero or greater than the rotor count
  • TIGL_NULL_POINTER if referenceAreaPtr is a null pointer
  • TIGL_ERROR if some other error occurred

◆ tiglRotorGetRotorBladeCount()

TiglReturnCode tiglRotorGetRotorBladeCount ( TiglCPACSConfigurationHandle  cpacsHandle,
int  rotorIndex,
int *  rotorBladeCountPtr 
)

Returns the total number of rotor blades attached to a rotor.

Fortran syntax:

tigl_get_rotor_blade_count(integer cpacsHandle, integer rotorIndex, integer rotorBladeCountPtr, integer returnCode)

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]rotorIndexIndex of the rotor to count the attached rotor blades
[out]rotorBladeCountPtrPointer to the number of rotor blades
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no configuration was found for the given handle
  • TIGL_NULL_POINTER if rotorBladeCountPtr is a null pointer
  • TIGL_ERROR if some other error occurred

◆ tiglRotorGetSolidity()

TiglReturnCode tiglRotorGetSolidity ( TiglCPACSConfigurationHandle  cpacsHandle,
int  rotorIndex,
double *  solidityPtr 
)

Returns the solidity of the rotor.

The rotor solidity ratio is calculated by dividing the total blade planform area by the rotor disk area.

Fortran syntax:

tigl_rotor_get_solidity(integer cpacsHandle, int rotorIndex, real solidityPtr, integer returnCode)

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]rotorIndexIndex of the rotor to calculate the area, starting at 1
[out]solidityPtrThe reference area of the rotor
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no configuration was found for the given handle
  • TIGL_INDEX_ERROR if rotorIndex is less or equal zero or greater than the rotor count
  • TIGL_NULL_POINTER if solidityPtr is a null pointer
  • TIGL_ERROR if some other error occurred

◆ tiglRotorGetSurfaceArea()

TiglReturnCode tiglRotorGetSurfaceArea ( TiglCPACSConfigurationHandle  cpacsHandle,
int  rotorIndex,
double *  surfaceAreaPtr 
)

Returns the surface area of the rotor.

The returned surface area is the sum of the surface areas of all attached rotor blades.

Fortran syntax:

tigl_rotor_get_surface_area(integer cpacsHandle, int rotorIndex, real surfaceAreaPtr, integer returnCode)

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]rotorIndexIndex of the Rotor to calculate the area, starting at 1
[out]surfaceAreaPtrThe surface area of the rotor
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no configuration was found for the given handle
  • TIGL_INDEX_ERROR if rotorIndex is less or equal zero or greater than the rotor count
  • TIGL_NULL_POINTER if surfaceAreaPtr is a null pointer
  • TIGL_ERROR if some other error occurred

◆ tiglRotorGetTipSpeed()

TiglReturnCode tiglRotorGetTipSpeed ( TiglCPACSConfigurationHandle  cpacsHandle,
int  rotorIndex,
double *  tipSpeedPtr 
)

Returns the tip speed of the rotor in [m/s].

The rotor tip speed is calculated using the nominal rotation speed of the rotor and the rotor radius.

Fortran syntax:

tigl_rotor_get_tip_speed(integer cpacsHandle, int rotorIndex, real tipSpeedPtr, integer returnCode)

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]rotorIndexIndex of the rotor to calculate the area, starting at 1
[out]tipSpeedPtrThe tip speed of the rotor
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no configuration was found for the given handle
  • TIGL_INDEX_ERROR if rotorIndex is less or equal zero or greater than the rotor count
  • TIGL_NULL_POINTER if tipSpeedPtr is a null pointer
  • TIGL_ERROR if some other error occurred

◆ tiglRotorGetTotalBladePlanformArea()

TiglReturnCode tiglRotorGetTotalBladePlanformArea ( TiglCPACSConfigurationHandle  cpacsHandle,
int  rotorIndex,
double *  totalBladePlanformAreaPtr 
)

Returns the total blade planform area of the rotor.

This function calculates the sum of the planform areas of all blades attached to the rotor hub.

Fortran syntax:

tigl_rotor_get_total_blade_planform_area(integer cpacsHandle, int rotorIndex, real totalBladePlanformAreaPtr, integer returnCode)

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]rotorIndexIndex of the rotor to calculate the area, starting at 1
[out]totalBladePlanformAreaPtrThe total blade planform area of the rotor
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no configuration was found for the given handle
  • TIGL_INDEX_ERROR if rotorIndex is less or equal zero or greater than the rotor count
  • TIGL_NULL_POINTER if totalBladePlanformAreaPtr is a null pointer
  • TIGL_ERROR if some other error occurred

◆ tiglRotorGetUID()

TiglReturnCode tiglRotorGetUID ( TiglCPACSConfigurationHandle  cpacsHandle,
int  rotorIndex,
char **  uidNamePtr 
)

Returns the UID of a rotor. The string returned must not be deleted by the caller via free(). It will be deleted when the CPACS configuration is closed.

Fortran syntax:

tigl_rotor_get_uid(integer cpacsHandle, integer rotorIndex, character*n uIDNamePtr, integer returnCode)

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]rotorIndexThe index of a rotor, starting at 1
[out]uidNamePtrThe uid of the rotor

Usage example:

   TiglReturnCode returnCode;
   char* uidPtr = 0;
   returnCode = tiglRotorGetUID(cpacsHandle, rotor, &uidPtr);
   printf("The UID of the rotor 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 rotorIndex is not valid
  • TIGL_NULL_POINTER if profileNamePtr is a null pointer
  • TIGL_ERROR if some other error occurred

◆ tiglRotorGetVolume()

TiglReturnCode tiglRotorGetVolume ( TiglCPACSConfigurationHandle  cpacsHandle,
int  rotorIndex,
double *  volumePtr 
)

Returns the volume of the rotor.

The returned volume is the sum of the volumes of all attached rotor blades.

Fortran syntax:

tigl_rotor_get_volume(integer cpacsHandle, int rotorIndex, real volumePtr, integer returnCode)

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]rotorIndexIndex of the rotor to calculate the volume, starting at 1
[out]volumePtrThe volume of the rotor
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no configuration was found for the given handle
  • TIGL_INDEX_ERROR if rotorIndex is less or equal zero or greater than the rotor count
  • TIGL_NULL_POINTER if volumePtr is a null pointer
  • TIGL_ERROR if some other error occurred

◆ tiglSaveCPACSConfiguration()

TiglReturnCode tiglSaveCPACSConfiguration ( const char *  configurationUID,
TiglCPACSConfigurationHandle  cpacsHandle 
)

Writes a CPACS configuration based on the data and geometry structure in memory.

Parameters
[in]configurationUIDThe UID of the configuration that should be written.
[in]cpacsHandleHandle to the CPACS configuration. This handle is used in calls to other TIGL functions.
Returns
  • TIGL_SUCCESS if the CPACS configuration was successfully written
  • TIGL_NULL_POINTER if cpacsHandle is an invalid null pointer
  • TIGL_UNINITIALIZED if cpacsHandle is not managed by the CCPACSConfigurationManager
  • TIGL_ERROR if some other kind of error occurred

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

◆ tiglSetExportOptions()

TiglReturnCode tiglSetExportOptions ( const char *  exporter_name,
const char *  option_name,
const char *  option_value 
)

Sets options for the geometry export.

Generic options for all exporters:

  • ApplySymmetries (Values: "true", "false"): Whether symmetric cpacs objects (e.g. wings) should be written.
  • IncludeFarfield (Values: "true", "false"): Whether to include the far field into the export or not.
  • ShapeGroupMode (Values: "WHOLE_SHAPE", "NAMED_COMPOUNDS", "FACES"): Adjust, how shapes are grouped.

Exporter-specific options:

  • VTK:
    • WriteNormals (Values: "true", "false"): Whether to write normal vectors or not. To avoid duplicate vertices, normals should be disabled.
    • MultiplePieces (Values: "true", "false"): Whether to export the shapes into multiple vtk pieces.
    • WriteMetaData (Values: "true", "false"): Whether to add meta data (e.g. wing segments etc...)
  • IGES:
    • IGES5.3 (Values: "true", "false"): Whether to use IGES 5.3 format, that supports shells and solids. Note: Some software do not yet implement this standard. E.g. Catia might only load this, when set to false!
    • FaceNames (Values: "UIDOnly", "FaceNameOnly", "UIDandFaceName", "None"): Defines, how to write the names of the faces to the IGES files. The most versatile is probably "UIDandFaceName". (Default: "FaceNameOnly")

Example: The IGES export normally does only write half-models. It does not apply symmetries. to change this, just call

tiglSetExportOptions("iges", "ApplySymmetries", "true");
Parameters
[in]exporter_nameFile format of the export. E.g. "vtk", "iges", "step", "collada", "brep" or "stl"
[in]option_nameName of the option to be set
[in]option_valueValue of the options to be set
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if the specified exporter or the option does not exist
  • TIGL_NULL_POINTER if exporter_name, option_name or option_value 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.

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

◆ tiglWingComponentSegmentGetMaterialCount()

TiglReturnCode tiglWingComponentSegmentGetMaterialCount ( TiglCPACSConfigurationHandle  cpacsHandle,
const char *  compSegmentUID,
TiglStructureType  structureType,
double  eta,
double  xsi,
int *  materialCount 
)

Returns the number of materials defined at a point on the wing component segment surface.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]compSegmentUIDUID of the component segment
[in]structureTypeType of structure, where the materials are queried
[in]etaeta in the range 0.0 <= eta <= 1.0
[in]xsixsi in the range 0.0 <= xsi <= 1.0
[out]materialCountNumber of materials defined at the given coordinate
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no configuration was found for the given handle
  • TIGL_NULL_POINTER if compSegmentUID or materialCount is a null pointer
  • TIGL_INDEX_ERROR if compSegmentUID or materialIndex is invalid
  • TIGL_ERROR if some other error occurred

◆ tiglWingComponentSegmentGetMaterialThickness()

TiglReturnCode tiglWingComponentSegmentGetMaterialThickness ( TiglCPACSConfigurationHandle  cpacsHandle,
const char *  compSegmentUID,
TiglStructureType  structureType,
double  eta,
double  xsi,
int  materialIndex,
double *  thickness 
)

Returns one of the material thicknesses of a given point on the wing component segment surface. The number of materials on that point has to be first queried using tiglWingComponentSegmentGetMaterialCount.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]compSegmentUIDUID of the component segment
[in]structureTypeType of structure, where the materials are queried
[in]etaeta in the range 0.0 <= eta <= 1.0
[in]xsixsi in the range 0.0 <= xsi <= 1.0
[in]materialIndexIndex of the material to query (1 <= index <= materialCount)
[out]thicknessMaterial thickness at the given coordinate. If no thickness is defined, thickness gets a negative value and TIGL_UNINITIALIZED is returned.
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no configuration was found for the given handle
  • TIGL_NULL_POINTER if compSegmentUID or thickness is a null pointer
  • TIGL_INDEX_ERROR if compSegmentUID or materialIndex is invalid
  • TIGL_UNINITIALIZED if no thickness is defined for the material
  • TIGL_ERROR if some other error occurred

◆ tiglWingComponentSegmentGetMaterialUID()

TiglReturnCode tiglWingComponentSegmentGetMaterialUID ( TiglCPACSConfigurationHandle  cpacsHandle,
const char *  compSegmentUID,
TiglStructureType  structureType,
double  eta,
double  xsi,
int  materialIndex,
char **  uid 
)

Returns one of the material UIDs of a given point on the wing component segment surface. The number of materials on that point has to be first queried using tiglWingComponentSegmentGetMaterialCount.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]compSegmentUIDUID of the component segment
[in]structureTypeType of structure, where the materials are queried
[in]etaeta in the range 0.0 <= eta <= 1.0
[in]xsixsi in the range 0.0 <= xsi <= 1.0
[in]materialIndexIndex of the material to query (1 <= index <= materialCount)
[out]uidMaterial uid at the given coordinate
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no configuration was found for the given handle
  • TIGL_NULL_POINTER if compSegmentUID is a null pointer
  • TIGL_INDEX_ERROR if compSegmentUID or materialIndex is invalid
  • 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.

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.

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 occured

◆ 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 occured

◆ 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 occured

◆ 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 occured

◆ 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 lenght 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 coinside 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

◆ tiglWingGetReferenceArea()

TiglReturnCode tiglWingGetReferenceArea ( TiglCPACSConfigurationHandle  cpacsHandle,
int  wingIndex,
TiglSymmetryAxis  symPlane,
double *  referenceAreaPtr 
)

Returns the reference area of the wing.

The reference area of the wing is calculated by taking account the quadrilateral portions of each wing segment by projecting the wing segments into the plane defined by the user. If projection should be avoided, use TIGL_NO_SYMMETRY as symPlane argument.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]wingIndexIndex of the Wing to calculate the area, starting at 1
[in]symPlanePlane on which the wing is projected for calculating the refarea. Values can be:
  • TIGL_NO_SYMMETRY, the wing is not projected but its true 3D area is calculated
  • TIGL_X_Y_PLANE, the wing is projected onto the x-y plane (use for e.g. main wings and HTPs)
  • TIGL_X_Z_PLANE, the wing is projected onto the x-z plane (use for e.g. VTPs)
  • TIGL_Y_Z_PLANE, the wing is projected onto the y-z plane
[out]referenceAreaPtrThe reference area of the wing
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

◆ 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

◆ tiglWingGetSegmentLowerSurfaceAreaTrimmed()

TiglReturnCode tiglWingGetSegmentLowerSurfaceAreaTrimmed ( TiglCPACSConfigurationHandle  cpacsHandle,
int  wingIndex,
int  segmentIndex,
double  eta1,
double  xsi1,
double  eta2,
double  xsi2,
double  eta3,
double  xsi3,
double  eta4,
double  xsi4,
double *  surfaceArea 
)

Computes the area of the trimmed lower wing segment surface. This function can be e.g. used to determine the area of the wing flaps.

The use of this function is analog to tiglWingGetSegmentUpperSurfaceAreaTrimmed.

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]eta1Eta value of P1 in range [0,1]
[in]xsi1Xsi value of P1 in range [0,1]
[in]eta2Eta value of P2 in range [0,1]
[in]xsi2Xsi value of P2 in range [0,1]
[in]eta3Eta value of P3 in range [0,1]
[in]xsi3Xsi value of P3 in range [0,1]
[in]eta4Eta value of P4 in range [0,1]
[in]xsi4Xsi value of P4 in range [0,1]
[out]surfaceAreaArea of the trimmed lower wing surface
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no configuration was found for the given handle
  • TIGL_INDEX_ERROR if wingIndex ot segmentIndex are not valid
  • TIGL_NULL_POINTER if surfaceArea is a null pointer
  • TIGL_ERROR if the eta/xsi coordinates are not in the valid range [0,1] or another error occured

◆ tiglWingGetSegmentSurfaceArea()

TiglReturnCode tiglWingGetSegmentSurfaceArea ( TiglCPACSConfigurationHandle  cpacsHandle,
int  wingIndex,
int  segmentIndex,
double *  surfaceAreaPtr 
)

Returns the surface area of a segment of a wing. This includes only the area of the upper and lower wing segment surface and does not include the trailing egde or any closing faces.

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]surfaceAreaPtrThe pointer to a variable for the surface area of the wing
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 surfaceAreaPtr 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

◆ tiglWingGetSegmentUpperSurfaceAreaTrimmed()

TiglReturnCode tiglWingGetSegmentUpperSurfaceAreaTrimmed ( TiglCPACSConfigurationHandle  cpacsHandle,
int  wingIndex,
int  segmentIndex,
double  eta1,
double  xsi1,
double  eta2,
double  xsi2,
double  eta3,
double  xsi3,
double  eta4,
double  xsi4,
double *  surfaceArea 
)

Computes the area of the trimmed upper wing segment surface. This function can be e.g. used to determine the area of the wing flaps.

The computed area does not include the trailing edge or any closing side faces.

All eta and xsi values must be in the range [0,1]. The trimmed area is defined with the four corner point P1, P2, P3, and P4. The order of the points should be right handed, as shown the the image below.

Location of the four corner points

Each of the points is defined with an eta/xsi coordinate pair in the wing segment system.

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]eta1Eta value of P1 in range [0,1]
[in]xsi1Xsi value of P1 in range [0,1]
[in]eta2Eta value of P2 in range [0,1]
[in]xsi2Xsi value of P2 in range [0,1]
[in]eta3Eta value of P3 in range [0,1]
[in]xsi3Xsi value of P3 in range [0,1]
[in]eta4Eta value of P4 in range [0,1]
[in]xsi4Xsi value of P4 in range [0,1]
[out]surfaceAreaArea of the trimmed upper wing surface
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no configuration was found for the given handle
  • TIGL_INDEX_ERROR if wingIndex ot segmentIndex are not valid
  • TIGL_NULL_POINTER if surfaceArea is a null pointer
  • TIGL_ERROR if the eta/xsi coordinates are not in the valid range [0,1] or another error occured

◆ tiglWingGetSegmentVolume()

TiglReturnCode tiglWingGetSegmentVolume ( TiglCPACSConfigurationHandle  cpacsHandle,
int  wingIndex,
int  segmentIndex,
double *  volumePtr 
)

Returns the volume of a segment of a wing.

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]volumePtrThe pointer to a variable for the volume of the wing
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 volumePtr 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

◆ tiglWingGetSurfaceArea()

TiglReturnCode tiglWingGetSurfaceArea ( TiglCPACSConfigurationHandle  cpacsHandle,
int  wingIndex,
double *  surfaceAreaPtr 
)

Returns the surface area of the wing. Currently, the area includes also the faces on the wing symmetry plane (in case of a symmetric wing). In coming releases, these faces will not belong anymore to the surface area calculation.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]wingIndexIndex of the Wing to calculate the area, starting at 1
[out]surfaceAreaPtrThe surface area of the wing
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

◆ 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

◆ tiglWingGetVolume()

TiglReturnCode tiglWingGetVolume ( TiglCPACSConfigurationHandle  cpacsHandle,
int  wingIndex,
double *  volumePtr 
)

Returns the volume of the wing.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]wingIndexIndex of the Wing to calculate the volume, starting at 1
[out]volumePtrThe volume of the wing
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

◆ tiglWingGetWettedArea()

TiglReturnCode tiglWingGetWettedArea ( TiglCPACSConfigurationHandle  cpacsHandle,
const char *  wingUID,
double *  wettedAreaPtr 
)

Returns the wetted area of the wing. If the wing has no parent (fuselage), it returns the surface area of the wing.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]wingUIDUID of the Wing to calculate the wetted area
[out]wettedAreaPtrThe wetted area of the wing
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no configuration was found for the given handle
  • TIGL_UID_ERROR if wingUID is wrong
  • TIGL_NULL_POINTER if wingIUD is NULL
  • 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.

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