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