Functions | |
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... | |
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... | |
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.
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.
[in] | cpacsHandle | Handle for the CPACS configuration |
[in] | curvesID1 | ID of the first intersection |
[in] | curve1Idx | Index of the curve in the first intersection |
[in] | curvesID2 | ID of the second intersection |
[in] | curve2Idx | Index of the curve in the second intersection |
[in] | tolerance | tolerance to specify the required accuracy of the intersection point |
[out] | intersectionID | A unique identifier that is associated with the computed intersection. |
TiglReturnCode tiglGetCurveIntersectionCount | ( | TiglCPACSConfigurationHandle | cpacsHandle, |
const char * | intersectionID, | ||
int * | pointCount | ||
) |
tiglGetCurveIntersectionCount returns the number of intersection points computed by tiglGetCurveIntersection for the given intersectionID.
[in] | cpacsHandle | Handle for the CPACS configuration |
[in] | intersectionID | The intersection identifier returned by tiglGetCurveIntersection |
[out] | pointCount | Number of intersection points computed by tiglGetCurveIntersection If no intersection could be computed, pointCount is 0. |
TiglReturnCode tiglGetCurveIntersectionPoint | ( | TiglCPACSConfigurationHandle | cpacsHandle, |
const char * | intersectionID, | ||
int | pointIdx, | ||
double * | pointX, | ||
double * | pointY, | ||
double * | pointZ | ||
) |
tiglGetCurveIntersectionPoint returns an intersection point calculated by tiglGetCurveIntersection
[in] | cpacsHandle | Handle for the CPACS configuration |
[in] | intersectionID | The intersection identifier returned by tiglGetCurveIntersection |
[in] | pointIdx | Index of the intersection point. To get the number of intersection points, call tiglGetCurveIntersectionCount with 1 <= pointIdx <= pointCount. |
[out] | pointX | X coordinate of the resulting point. |
[out] | pointY | Y coordinate of the resulting point. |
[out] | pointZ | Z coordinate of the resulting point. |
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.
[in] | cpacsHandle | Handle for the CPACS configuration |
[in] | curveID | The id of the intersection line. |
[in] | curveIdx | The index of curve in the intersection. |
[in] | pointX | X coordinate of the point to be projected. |
[in] | pointY | Y coordinate of the point to be projected. |
[in] | pointZ | Z coordinate of the point to be projected. |
[out] | eta | The parameter along the first curve. |
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.
[in] | cpacsHandle | Handle for the CPACS configuration |
[in] | componentUidOne | The UID of the first component |
[in] | componentUidTwo | The UID of the second component |
[out] | intersectionID | A unique identifier that is associated with the computed intersection. |
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.
[in] | cpacsHandle | Handle for the CPACS configuration |
[in] | intersectionID | The intersection identifier returned by tiglIntersectComponents or tiglIntersectWithPlane |
[out] | lineCount | Number of intersection lines computed by tiglIntersectComponents or tiglIntersectWithPlane. If no intersection could be computed, line count is 0. |
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.
[in] | cpacsHandle | Handle for the CPACS configuration |
[in] | intersectionID | The intersection identifier returned by tiglIntersectComponents or tiglIntersectWithPlane |
[in] | lineIdx | Line index to sample from. To get the number of lines, call tiglIntersectGetLineCount. 1 <= lineIdx <= lineCount. |
[in] | eta | Parameter on the curve that determines the point position, with 0 <= eta <= 1. |
[out] | pointX | X coordinate of the resulting point. |
[out] | pointY | Y coordinate of the resulting point. |
[out] | pointZ | Z coordinate of the resulting point. |
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!
[in] | cpacsHandle | Handle for the CPACS configuration |
[in] | componentUid | The UID of the CPACS shape |
[in] | px | X Coordinate of the plane center point |
[in] | py | Y Coordinate of the plane center point |
[in] | pz | Z Coordinate of the plane center point |
[in] | nx | X value of the plane normal vector |
[in] | ny | Y value of the plane normal vector |
[in] | nz | Z value of the plane normal vector |
[out] | intersectionID | A unique identifier that is associated with the computed intersection. |
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).
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!
[in] | cpacsHandle | Handle for the CPACS configuration |
[in] | componentUid | The UID of the CPACS shape |
[in] | p1x | X Coordinate of the first point P1 |
[in] | p1y | Y Coordinate of the first point P1 |
[in] | p1z | Z Coordinate of the first point P1 |
[in] | p2x | X Coordinate of the second point P2 |
[in] | p2y | Y Coordinate of the second point P2 |
[in] | p2z | Z Coordinate of the second point P2 |
[in] | wx | X value of the normal vector w |
[in] | wy | Y value of the normal vector w |
[in] | wz | Z value of the normal vector w |
[out] | intersectionID | A unique identifier that is associated with the computed intersection. |