TiGL  2.2.3
Functions for boolean calculations

Functions

TIGL_COMMON_EXPORT TiglReturnCode tiglComponentIntersectionLineCount (TiglCPACSConfigurationHandle cpacsHandle, const char *componentUidOne, const char *componentUidTwo, int *numWires)
 The function returns the number of intersection lines of two geometric components. More...
 
TIGL_COMMON_EXPORT TiglReturnCode tiglComponentIntersectionPoint (TiglCPACSConfigurationHandle cpacsHandle, const char *componentUidOne, const char *componentUidTwo, int lineID, double eta, double *pointXPtr, double *pointYPtr, double *pointZPtr)
 The function returns a point on the intersection line of two geometric components. Often there are more that one intersection line, therefore you need to specify the line. More...
 
TIGL_COMMON_EXPORT TiglReturnCode tiglComponentIntersectionPoints (TiglCPACSConfigurationHandle cpacsHandle, const char *componentUidOne, const char *componentUidTwo, int lineID, const double *etaArray, int numberOfPoints, double *pointXArray, double *pointYArray, double *pointZArray)
 Convienience function to returns a list of points on the intersection line of two geometric components. Often there are more that one intersection line, therefore you need to specify the line. More...
 
TIGL_COMMON_EXPORT 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...
 
TIGL_COMMON_EXPORT TiglReturnCode tiglIntersectGetLineCount (TiglCPACSConfigurationHandle cpacsHandle, const char *intersectionID, int *lineCount)
 tiglIntersectGetLineCount return the number of intersection lines computed by tiglIntersectComponents or tiglIntersectWithPlane for the given intersectionID. More...
 
TIGL_COMMON_EXPORT 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 or tiglIntersectWithPlane. More...
 
TIGL_COMMON_EXPORT 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...
 

Detailed Description

Function for boolean calculations on wings/fuselages.

These function currently only implement intersection algorithms between two shapes defined in cpacs ot a shape and a plane. Shapes or geometries are identified with their cpacs uid.

Currently only wings, wing segments, fuselages, and fuselage segments can be used in the intersection routines.

Function Documentation

TIGL_COMMON_EXPORT TiglReturnCode tiglComponentIntersectionLineCount ( TiglCPACSConfigurationHandle  cpacsHandle,
const char *  componentUidOne,
const char *  componentUidTwo,
int *  numWires 
)

The function returns the number of intersection lines of two geometric components.

Deprecated:
This is a deprecated function and will be removed in future releases. Use tiglIntersectGetLineCount in combination with tiglIntersectGetPoint instead.
Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]componentUidOneThe UID of the first component
[in]componentUidTwoThe UID of the second component
[out]numWiresThe number of intersection lines
Returns
  • TIGL_SUCCESS if there are not intersection lines
  • TIGL_NOT_FOUND if no point was found or the cpacs handle is not valid
  • TIGL_ERROR if some other error occurred
TIGL_COMMON_EXPORT TiglReturnCode tiglComponentIntersectionPoint ( TiglCPACSConfigurationHandle  cpacsHandle,
const char *  componentUidOne,
const char *  componentUidTwo,
int  lineID,
double  eta,
double *  pointXPtr,
double *  pointYPtr,
double *  pointZPtr 
)

The function returns a point on the intersection line of two geometric components. Often there are more that one intersection line, therefore you need to specify the line.

Deprecated:
This is a deprecated function and will be removed in future releases. Use tiglIntersectComponents and tiglIntersectGetPoint instead.

Returns a point on the intersection line between a surface and a wing in dependence of parameter eta which range from 0.0 to 1.0. The point is returned in absolute world coordinates.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]componentUidOneThe UID of the first component
[in]componentUidTwoThe UID of the second component
[in]lineIDThe index of the intersection wire, get wire number with "tiglComponentIntersectionLineCount"
[in]etaeta in the range 0.0 <= eta <= 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_NULL_POINTER if pointXPtr, pointYPtr or pointZPtr are null pointers
  • TIGL_ERROR if some other error occurred
TIGL_COMMON_EXPORT TiglReturnCode tiglComponentIntersectionPoints ( TiglCPACSConfigurationHandle  cpacsHandle,
const char *  componentUidOne,
const char *  componentUidTwo,
int  lineID,
const double *  etaArray,
int  numberOfPoints,
double *  pointXArray,
double *  pointYArray,
double *  pointZArray 
)

Convienience function to returns a list of points on the intersection line of two geometric components. Often there are more that one intersection line, therefore you need to specify the line.

Deprecated:
This is a deprecated function and will be removed in future releases. Use tiglIntersectComponents and tiglIntersectGetPoint instead.

Returns a point on the intersection line between a surface and a wing in dependence of parameter eta which range from 0.0 to 1.0. The point is returned in absolute world coordinates.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]componentUidOneThe UID of the first component
[in]componentUidTwoThe UID of the second component
[in]lineIDThe index of the intersection wire, get wire number with "tiglComponentIntersectionLineCount"
[in]etaArrayArray of eta values in the range 0.0 <= eta <= 1.0.
[in]numberOfPointsThe number of points to calculate i.e. the size of the etaArray.
[out]pointXArrayArray of x-coordinates of the points in absolute world coordinates. The Array must be preallocated with the size numberOfPoints.
[out]pointYArrayArray of y-coordinates of the points in absolute world coordinates. The Array must be preallocated with the size numberOfPoints.
[out]pointZArrayArray of z-coordinates of the points in absolute world coordinates. The Array must be preallocated with the size numberOfPoints.
Returns
  • TIGL_NOT_FOUND if no point was found or the cpacs handle is not valid
  • TIGL_NULL_POINTER if pointXPtr, pointYPtr or pointZPtr are null pointers
  • TIGL_ERROR if some other error occurred
TIGL_COMMON_EXPORT 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
TIGL_COMMON_EXPORT TiglReturnCode tiglIntersectGetLineCount ( TiglCPACSConfigurationHandle  cpacsHandle,
const char *  intersectionID,
int *  lineCount 
)

tiglIntersectGetLineCount return the number of intersection lines computed by tiglIntersectComponents or tiglIntersectWithPlane 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
TIGL_COMMON_EXPORT 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 or tiglIntersectWithPlane.

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

Generated Tue Sep 24 2019 15:24:16, by Martin Siggel DLR