FC_CommonTangentsOfTwoCircles2D
FC_CommonTangentsOfTwoCircles2D - General Information
Type: |
Function |
Available as of: |
V1.0.3.0 |
Versions: |
Current version |
Calculates the common tangents of two circles in the 2-dimensional space.
Calculates the common tangents of the circles i_stCircle1 and i_stCircle2. There are several options here:
oThere exists no common tangent.
oThere exists one common tangent.
oThere exist two common tangents.
oThere are three common tangents.
oThere exist four common tangents.
oThere exists an infinite number of common tangents (the circles coincide).
The following figures illustrate the various different cases.
No common tangents
One common tangent
Two common tangents
Three common tangents
Four common tangents
Input |
Data type |
Description |
---|---|---|
i_stCircle1 |
Circle 1 |
|
i_stCircle2 |
Circle 2 |
Output |
Data type |
Description |
---|---|---|
q_etDiag |
General library-independent statement on the diagnostic. A value not equal to ET_Diag.Ok corresponds to an diagnostic message. |
|
q_etDiagExt |
POU-specific output on the diagnostic. q_etDiag = ET_Diag.Ok -> Status message q_etDiag <> ET_Diag.Ok -> Diagnostic message |
|
q_diNumberOfCommonTangents |
DINT |
Number of common tangents. Possible values: 0: no common tangents 1...4: 1...4 common tangents 99: an infinite number of common tangents |
q_astTouchPointsCircle1 |
ARRAY[1..4] OF ST_Vector2D |
Contact points of the tangents on circle 1 |
q_astTouchPointsCircle2 |
ARRAY[1..4] OF ST_Vector2D |
Contact points of the tangents on circle 2 |
q_etDiag |
q_etDiagExt |
Enumeration value |
Description |
---|---|---|---|
OK |
0 |
Ok |
|
InputParameterInvalid |
27 |
The radius of circle 1 is outside the valid range. |
|
InputParameterInvalid |
28 |
The radius of circle 2 is outside the valid range. |
Enumeration name: |
Ok |
Enumeration value: |
0 |
Description: |
Ok |
The tangents have been calculated successfully.
Enumeration name: |
RadiusRangeCircle1 |
Enumeration value: |
27 |
Description: |
The radius of circle 1 is outside the valid range. |
Issue |
Cause |
Solution |
---|---|---|
- |
At the input i_stCircle1.lrRadius, a number <= 0 has been transferred. |
The radius of the circle must be greater than zero. |
Enumeration name: |
RadiusRangeCircle2 |
Enumeration value: |
28 |
Description: |
The radius of circle 2 is outside the valid range. |
Issue |
Cause |
Solution |
---|---|---|
- |
At the input i_stCircle2.lrRadius, a number <= 0 has been transferred. |
The radius of the circle must be greater than zero. |