FC_DistanceBoxAndSphere - General Information
Type: |
Function |
Available as of: |
V1.0.3.0 |
Versions: |
Current version |
Calculates the distance between a cuboid and a sphere.
This calculates the distance between the cuboid i_stBox and the sphere i_stSphere.
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_lrDistance |
LREAL |
Calculated distance between i_stBox and i_stSphere. |
q_etDiag |
q_etDiagExt |
Enumeration value |
Description |
---|---|---|---|
OK |
0 |
Ok |
|
InputParameterInvalid |
34 |
The definition of Box is not correct. |
|
InputParameterInvalid |
22 |
The radius of the sphere is outside the valid range. |
Enumeration name: |
DefinitionBox |
Enumeration value: |
34 |
Description: |
The definition of Box is not correct. |
Issue |
Cause |
Solution |
---|---|---|
- |
At the inputs i_stBox.stSpanPoint1 and i_stBox.stBasePoint, the same point has been transferred. |
The distance between i_stBox.stSpanPoint1 and i_stBox.stBasePoint must be at least Gc_lrZeroTolerance. |
- |
At the inputs i_stBox.stSpanPoint2 and i_stBox.stBasePoint, the same point has been transferred. |
The distance between i_stBox.stSpanPoint2 and i_stBox.stBasePoint must be at least Gc_lrZeroTolerance. |
- |
At the inputs i_stBox.stSpanPoint3 and i_stBox.stBasePoint, the same point has been transferred. |
The distance between i_stBox.stSpanPoint3 and i_stBox.stBasePoint must be at least Gc_lrZeroTolerance. |
Enumeration name: |
Ok |
Enumeration value: |
0 |
Description: |
Ok |
The distance has been calculated successfully.
Enumeration name: |
RadiusRangeSphere |
Enumeration value: |
22 |
Description: |
The radius of the sphere is outside the valid range. |
Issue |
Cause |
Solution |
---|---|---|
- |
At the input i_stSphere.lrRadius, a number <= 0 has been applied. |
The radius of the sphere must be greater than 0. |