FC_CommonPointsOfTwoCircles2D - General Information
Type: |
Function |
Available as of: |
V1.0.3.0 |
Versions: |
Current version |
Calculates the intersections of two circles in the 2-dimensional space.
Calculates the intersections of the circles i_stCircle1 and i_stCircle2. If these circles coincide, the number of intersections is 99. If there are no intersections, an additional verification is performed to determine whether one of the objects is contained in the other.
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_diNumberOfCommonPoints |
DINT |
Number of intersections of i_stCircle_1 and i_stCircle_2. Possible values: 0, 1, 2 or 99 (circles coincide) |
q_astCommonPoints |
ARRAY [1..2] OF ST_Vector2D |
Intersections (only valid if q_diNumberOfCommonPoints > 0) |
q_etDiag |
q_etDiagExt |
Enumeration value |
Description |
---|---|---|---|
OK |
53 |
Circle 1 lies inside of circle 2. |
|
OK |
54 |
Circle 2 lies inside of circle 1. |
|
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: |
Circle1InsideCircle2 |
Enumeration value: |
53 |
Description: |
Circle 1 lies inside of circle 2. |
No intersections have been calculated since circle 1 entirely lies inside circle 2.
Enumeration name: |
Circle2InsideCircle1 |
Enumeration value: |
54 |
Description: |
Circle 2 lies inside of circle 1. |
No intersections have been calculated since circle 2 entirely lies inside circle 1.
Enumeration name: |
Ok |
Enumeration value: |
0 |
Description: |
Ok |
The intersections 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. |